qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v7 2/7] option: make parse_option_bool/number no


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v7 2/7] option: make parse_option_bool/number non-static
Date: Wed, 13 Jul 2016 19:33:09 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 07/05/2016 07:11 AM, Daniel P. Berrange wrote:
> The opts-visitor.c opts_type_bool() method has code for
> parsing a string to set a bool value, as does the
> qemu-option.c parse_option_bool() method, except it
> handles fewer cases.
> 
> To enable consistency across the codebase, extend
> parse_option_bool() to handle "yes", "no", "y" and
> "n", and make it non-static. Convert the opts
> visitor to call this method directly.
> 
> Also make parse_option_number() non-static to allow
> for similar reuse later.
> 
> Reviewed-by: Marc-André Lureau <address@hidden>
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
>  include/qemu/option.h |  4 ++++
>  qapi/opts-visitor.c   | 19 +------------------
>  util/qemu-option.c    | 27 ++++++++++++++++-----------
>  3 files changed, 21 insertions(+), 29 deletions(-)
> 

Reviewed-by: Eric Blake <address@hidden>

I'm going to include this in my proposed fallback patches on my qapi
subset F series, where we may need to "fix" netdev_add to care about
back-compat parsing of a string where an integer is expected.

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