qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V26 02/32] QemuOpts: add def_value_str to QemuOp


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH V26 02/32] QemuOpts: add def_value_str to QemuOptDesc
Date: Tue, 29 Apr 2014 10:36:03 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 04/29/2014 03:10 AM, Chunyan Liu wrote:
> Add def_value_str (default value) to QemuOptDesc, to replace function of the
> default value in QEMUOptionParameter.
> 
> Improve qemu_opts_get_* functions: if find opt, return opt->str; otherwise,
> if desc->def_value_str is set, return desc->def_value_str; otherwise, return
> input defval.
> 
> Improve qemu_opts_print: if option is set, print opt->str; otherwise, if
> desc->def_value_str is set, also print it. It will replace
> print_option_parameters.
> 
> Signed-off-by: Dong Xu Wang <address@hidden>
> Signed-off-by: Chunyan Liu <address@hidden>
> ---
> Changes to V25:
>   * split v25 patch into two: this one and next one.
>   * this patch is the same as v22 which is reviewed-by Eric.
> 
>  include/qemu/option.h |  3 ++-
>  util/qemu-option.c    | 56 
> ++++++++++++++++++++++++++++++++++++++++++---------
>  2 files changed, 49 insertions(+), 10 deletions(-)


> @@ -895,17 +918,32 @@ void qemu_opts_del(QemuOpts *opts)
>      g_free(opts);
>  }
>  
> -int qemu_opts_print(QemuOpts *opts, void *dummy)
> +void qemu_opts_print(QemuOpts *opts)
>  {

This part of the hunk belongs with the changes in 3/32.  I think you got
the split backwards - you want qemu_opts_print to be repurposed in
isolation, THEN add the enhancement of a default string.

Everything else in this patch looks okay, though.  I'm torn on whether
we need a v27, or whether it is time to just take this as-is, as the end
result of the two patches together is correct, and just the intermediate
state and the split between the patches was awkward.

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