On 09/20/2016 04:08 PM, Kevin Wolf wrote:
> Amonst others, this means that you can now use the 'detect-zeroes'

s/Amonst/Amongst/ (that's UK spelling; US shortens it to Among)

> option for non-top-level nodes in blockdev-add, like the QAPI schema
> promises.
> 
> Signed-off-by: Kevin Wolf <kw...@redhat.com>
> ---
>  block.c    | 33 +++++++++++++++++++++++++++++++++
>  blockdev.c |  9 +--------
>  2 files changed, 34 insertions(+), 8 deletions(-)
> 

> @@ -990,6 +997,32 @@ static int bdrv_open_common(BlockDriverState *bs, 
> BdrvChild *file,
>          }
>      }
>  
> +    detect_zeroes = qemu_opt_get(opts, "detect-zeroes");
> +    if (detect_zeroes) {
> +        BlockdevDetectZeroesOptions value =
> +            qapi_enum_parse(BlockdevDetectZeroesOptions_lookup,
> +                            qemu_opt_get(opts, "detect-zeroes"),

Why do we have to repeat the qemu_opt_get() here, instead of just
passing in the just-collected detect_zeroes local variable?

Otherwise looks fine.

-- 
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