qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v22 20/25] vdi.c: replace QEMUOptionParameter wi


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v22 20/25] vdi.c: replace QEMUOptionParameter with QemuOpts
Date: Tue, 11 Mar 2014 18:50:07 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Mar 10, 2014 at 03:31:56PM +0800, Chunyan Liu wrote:
> @@ -669,25 +668,17 @@ static int vdi_create(const char *filename, 
> QEMUOptionParameter *options,
>      logout("\n");
>  
>      /* Read out options. */
> -    while (options && options->name) {
> -        if (!strcmp(options->name, BLOCK_OPT_SIZE)) {
> -            bytes = options->value.n;
> +    bytes = qemu_opt_get_size_del(opts, BLOCK_OPT_SIZE, 0);
>  #if defined(CONFIG_VDI_BLOCK_SIZE)
> -        } else if (!strcmp(options->name, BLOCK_OPT_CLUSTER_SIZE)) {
> -            if (options->value.n) {
> -                /* TODO: Additional checks (SECTOR_SIZE * 2^n, ...). */
> -                block_size = options->value.n;
> -            }
> +    block_size = qemu_opt_get_size_del(opts,
> +                                       BLOCK_OPT_CLUSTER_SIZE,
> +                                       DEFAULT_CLUSTER_SIZE);

Please keep the TODO.



reply via email to

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