qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 05/20] iscsi: fix indentation


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH 05/20] iscsi: fix indentation
Date: Mon, 10 Feb 2014 15:48:55 +0800
User-agent: Mutt/1.5.22 (2013-10-16)

On Sun, 02/09 10:48, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  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
> 

Reviewed-by: Fam Zheng <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]