diff options
author | Chunyan Liu | 2014-06-05 11:20:42 +0200 |
---|---|---|
committer | Stefan Hajnoczi | 2014-06-16 11:23:20 +0200 |
commit | 09722032e15669e653991923613761602c745fa0 (patch) | |
tree | c25f90910ebc8f4a1c2bed88c8ee280b3253a669 /include | |
parent | QemuOpts: repurpose qemu_opts_print to replace print_option_parameters (diff) | |
download | qemu-09722032e15669e653991923613761602c745fa0.tar.gz qemu-09722032e15669e653991923613761602c745fa0.tar.xz qemu-09722032e15669e653991923613761602c745fa0.zip |
QemuOpts: add def_value_str to QemuOptDesc
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, print it.
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Chunyan Liu <cyliu@suse.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/option.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qemu/option.h b/include/qemu/option.h index 1077b69851..c3b0a917d9 100644 --- a/include/qemu/option.h +++ b/include/qemu/option.h @@ -99,6 +99,7 @@ typedef struct QemuOptDesc { const char *name; enum QemuOptType type; const char *help; + const char *def_value_str; } QemuOptDesc; struct QemuOptsList { |