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 <[email protected]>
> Reviewed-by: Eric Blake <[email protected]>
> Signed-off-by: Dong Xu Wang <[email protected]>
> Signed-off-by: Chunyan Liu <[email protected]>
> ---
> 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 <[email protected]>

Reply via email to