mirror of
https://github.com/qemu/qemu.git
synced 2024-11-26 12:23:36 +08:00
iscsi: fix indentation
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
537b41f501
commit
35cb1748d5
@ -1065,35 +1065,36 @@ static QemuOptsList runtime_opts = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi,
|
||||
int lun, int evpd, int pc) {
|
||||
int full_size;
|
||||
struct scsi_task *task = NULL;
|
||||
task = iscsi_inquiry_sync(iscsi, lun, evpd, pc, 64);
|
||||
static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int lun,
|
||||
int evpd, int pc)
|
||||
{
|
||||
int full_size;
|
||||
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) {
|
||||
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:
|
||||
error_report("iSCSI: Inquiry command failed : %s",
|
||||
iscsi_get_error(iscsi));
|
||||
if (task) {
|
||||
scsi_free_scsi_task(task);
|
||||
return NULL;
|
||||
}
|
||||
error_report("iSCSI: Inquiry command failed : %s",
|
||||
iscsi_get_error(iscsi));
|
||||
if (task) {
|
||||
scsi_free_scsi_task(task);
|
||||
return NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user