qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v22 24/25] vvfat.c: replace QEMUOptionParameter


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v22 24/25] vvfat.c: replace QEMUOptionParameter with QemuOpts
Date: Tue, 11 Mar 2014 11:06:52 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 03/10/2014 01:32 AM, Chunyan Liu wrote:
> Signed-off-by: Dong Xu Wang <address@hidden>
> Signed-off-by: Chunyan Liu <address@hidden>
> ---
>  block/vvfat.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 

>      bdrv_qcow = bdrv_find_format("qcow");
> -    options = parse_option_parameters("", bdrv_qcow->create_options, NULL);

Problem.  This code is broken from the time that patch 11/25 is applied
until now.  That's because commit 11 changed bdrv_qcow from having
create_options over to having create_opts.  Do any of the other drivers
do cross-driver option sharing?  It would be nice to fix that to quit
happening, preferably earlier in the series than where you start doing
per-driver conversions.

> -    set_option_parameter_int(options, BLOCK_OPT_SIZE, s->sector_count * 512);
> -    set_option_parameter(options, BLOCK_OPT_BACKING_FILE, "fat:");
> +    opts = qemu_opts_create(bdrv_qcow->create_opts, NULL, 0, &error_abort);
> +    qemu_opt_set_number(opts, BLOCK_OPT_SIZE, s->sector_count * 512);
> +    qemu_opt_set(opts, BLOCK_OPT_BACKING_FILE, "fat:");
>  
> -    ret = bdrv_create(bdrv_qcow, s->qcow_filename, options, NULL, 
> &local_err);
> +    ret = bdrv_create(bdrv_qcow, s->qcow_filename, NULL, opts, &local_err);
>      if (ret < 0) {
>          qerror_report_err(local_err);
>          error_free(local_err);
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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