mirror of
https://github.com/mborgerson/xemu.git
synced 2025-12-01 16:10:01 +00:00
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>
This commit is contained in:
committed by
Stefan Hajnoczi
parent
e67905426b
commit
09722032e1
@ -99,6 +99,7 @@ typedef struct QemuOptDesc {
|
||||
const char *name;
|
||||
enum QemuOptType type;
|
||||
const char *help;
|
||||
const char *def_value_str;
|
||||
} QemuOptDesc;
|
||||
|
||||
struct QemuOptsList {
|
||||
|
||||
Reference in New Issue
Block a user