提交 35cb1748 编写于 作者: P Paolo Bonzini 提交者: Kevin Wolf

iscsi: fix indentation

Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Reviewed-by: NFam Zheng <famz@redhat.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 537b41f5
...@@ -1065,35 +1065,36 @@ static QemuOptsList runtime_opts = { ...@@ -1065,35 +1065,36 @@ static QemuOptsList runtime_opts = {
}, },
}; };
static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int lun,
int lun, int evpd, int pc) { int evpd, int pc)
int full_size; {
struct scsi_task *task = NULL; int full_size;
task = iscsi_inquiry_sync(iscsi, lun, evpd, pc, 64); struct scsi_task *task = NULL;
task = iscsi_inquiry_sync(iscsi, lun, evpd, pc, 64);
if (task == NULL || task->status != SCSI_STATUS_GOOD) {
goto fail;
}
full_size = scsi_datain_getfullsize(task);
if (full_size > task->datain.size) {
scsi_free_scsi_task(task);
/* we need more data for the full list */
task = iscsi_inquiry_sync(iscsi, lun, evpd, pc, full_size);
if (task == NULL || task->status != SCSI_STATUS_GOOD) { if (task == NULL || task->status != SCSI_STATUS_GOOD) {
goto fail; goto fail;
} }
full_size = scsi_datain_getfullsize(task); }
if (full_size > task->datain.size) {
scsi_free_scsi_task(task);
/* we need more data for the full list */
task = iscsi_inquiry_sync(iscsi, lun, evpd, pc, full_size);
if (task == NULL || task->status != SCSI_STATUS_GOOD) {
goto fail;
}
}
return task; return task;
fail: fail:
error_report("iSCSI: Inquiry command failed : %s", error_report("iSCSI: Inquiry command failed : %s",
iscsi_get_error(iscsi)); iscsi_get_error(iscsi));
if (task) { if (task) {
scsi_free_scsi_task(task); scsi_free_scsi_task(task);
return NULL;
}
return NULL; return NULL;
}
return NULL;
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册