[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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH V26 00/32] replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 03/32] QemuOpts: repurpose qemu_opts_print to replace print_option_parameters, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 01/32] QemuOpts: move find_desc_by_name ahead for later calling, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 02/32] QemuOpts: add def_value_str to QemuOptDesc, Chunyan Liu, 2014/04/29
- Re: [Qemu-devel] [PATCH V26 02/32] QemuOpts: add def_value_str to QemuOptDesc,
Eric Blake <=
- [Qemu-devel] [PATCH V26 04/32] qapi: output def_value_str when query command line options, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 05/32] QemuOpts: change opt->name|str from (const char *) to (char *), Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 08/32] QemuOpts: add qemu_opts_print_help to replace print_option_help, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 10/32] QemuOpts: add qemu_opts_append to replace append_option_parameters, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 09/32] QemuOpts: add conversion between QEMUOptionParameter to QemuOpts, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 11/32] QemuOpts: check NULL input for qemu_opts_del, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 06/32] QemuOpts: move qemu_opt_del ahead for later calling, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 12/32] change block layer to support both QemuOpts and QEMUOptionParamter, Chunyan Liu, 2014/04/29