qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] blockdev: Remove 'type' parameter from blockdev


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH] blockdev: Remove 'type' parameter from blockdev_init()
Date: Mon, 10 Feb 2014 15:22:42 +0800
User-agent: Mutt/1.5.22 (2013-10-16)

On Sun, 02/09 09:52, Kevin Wolf wrote:
> @@ -872,8 +869,27 @@ DriveInfo *drive_init(QemuOpts *all_opts, 
> BlockInterfaceType block_default_type)
>  
>      filename = qemu_opt_get(legacy_opts, "file");
>  
> +    /* Check werror/rerror compatibility with if=... */
> +    werror = qemu_opt_get(legacy_opts, "werror");
> +    if (werror != NULL) {
> +        if (type != IF_IDE && type != IF_SCSI && type != IF_VIRTIO && type 
> != IF_NONE) {

This line,

> +            error_report("werror is not supported by this bus type");
> +            goto fail;
> +        }
> +        qdict_put(bs_opts, "werror", qstring_from_str(werror));
> +    }
> +
> +    rerror = qemu_opt_get(legacy_opts, "rerror");
> +    if (rerror != NULL) {
> +        if (type != IF_IDE && type != IF_VIRTIO && type != IF_SCSI && type 
> != IF_NONE) {

and this line are over 80 characters. You could wrap them since they are being 
moved.

Otherwise looks good.

Thanks,
Fam

> +            error_report("rerror is not supported by this bus type");
> +            goto fail;
> +        }
> +        qdict_put(bs_opts, "rerror", qstring_from_str(rerror));
> +    }
> +
>      /* Actual block device init: Functionality shared with blockdev-add */
> -    dinfo = blockdev_init(filename, bs_opts, type, &local_err);
> +    dinfo = blockdev_init(filename, bs_opts, &local_err);
>      if (dinfo == NULL) {
>          if (error_is_set(&local_err)) {
>              qerror_report_err(local_err);



reply via email to

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