[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v25 02/31] QemuOpts: add def_value_str to QemuOp
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v25 02/31] QemuOpts: add def_value_str to QemuOptDesc |
Date: |
Fri, 25 Apr 2014 15:50:05 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Apr 11, 2014 at 01:53:58AM +0800, 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. To avoid print info changes, change qemu_opts_print
> from fprintf stderr to printf, and remove last printf.
>
> Reviewed-by: Leandro Dorileo <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> Signed-off-by: Dong Xu Wang <address@hidden>
> Signed-off-by: Chunyan Liu <address@hidden>
> ---
> changes:
> * Following Leandro's comment:
> merge v24 0002-QemuOpts-add-def_value_str-to-QemuOptDesc.patch and
> v24 0011-qemu_opts_print-change-fprintf-stderr-to-printf.patch into one.
>
> include/qemu/option.h | 3 ++-
> util/qemu-option.c | 60
> ++++++++++++++++++++++++++++++++++++++++++---------
> 2 files changed, 52 insertions(+), 11 deletions(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
- [Qemu-devel] [PATCH v25 00/31] replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/04/11
- [Qemu-devel] [PATCH v25 02/31] QemuOpts: add def_value_str to QemuOptDesc, Chunyan Liu, 2014/04/11
- [Qemu-devel] [PATCH v25 05/31] QemuOpts: move qemu_opt_del ahead for later calling, Chunyan Liu, 2014/04/11
- [Qemu-devel] [PATCH v25 04/31] QemuOpts: change opt->name|str from (const char *) to (char *), Chunyan Liu, 2014/04/11
- [Qemu-devel] [PATCH v25 01/31] QemuOpts: move find_desc_by_name ahead for later calling, Chunyan Liu, 2014/04/11
- [Qemu-devel] [PATCH v25 03/31] qapi: output def_value_str when query command line options, Chunyan Liu, 2014/04/11
- [Qemu-devel] [PATCH v25 06/31] QemuOpts: add qemu_opt_get_*_del functions for replace work, Chunyan Liu, 2014/04/11