aboutsummaryrefslogtreecommitdiff
path: root/block/iscsi.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-02-17 14:43:52 +0100
committerKevin Wolf <kwolf@redhat.com>2014-02-21 21:02:23 +0100
commit35cb1748d54c8e56881a5e10138b3eb090f3a6bc (patch)
treee7da769a088ce079fce779f50234aed892ebe3ff /block/iscsi.c
parent537b41f5013e1951fa15e8f18855b18d76124ce4 (diff)
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>
Diffstat (limited to 'block/iscsi.c')
-rw-r--r--block/iscsi.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/block/iscsi.c b/block/iscsi.c
index f8e496f8ef..ac5a5c73e3 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -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;
}
/*