From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDGrk-0001aq-2u for qemu-devel@nongnu.org; Tue, 11 Feb 2014 12:11:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDGrZ-0002BL-ST for qemu-devel@nongnu.org; Tue, 11 Feb 2014 12:11:24 -0500 Received: from mail-qc0-x235.google.com ([2607:f8b0:400d:c01::235]:63751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDGrZ-0002Ae-Md for qemu-devel@nongnu.org; Tue, 11 Feb 2014 12:11:13 -0500 Received: by mail-qc0-f181.google.com with SMTP id e9so13522607qcy.12 for ; Tue, 11 Feb 2014 09:11:10 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 11 Feb 2014 18:03:38 +0100 Message-Id: <1392138233-26407-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1392138233-26407-1-git-send-email-pbonzini@redhat.com> References: <1392138233-26407-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v2 05/20] iscsi: fix indentation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com Signed-off-by: Paolo Bonzini --- block/iscsi.c | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 6f4af72..e654a57 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; } /* -- 1.8.5.3