summaryrefslogtreecommitdiffstats
path: root/hw/usb/dev-uas.c
diff options
context:
space:
mode:
authorPaolo Bonzini2020-11-03 14:48:11 +0100
committerPaolo Bonzini2021-01-23 21:55:08 +0100
commitafd736252f106ec54734d4e412220a978f668430 (patch)
tree4a911bf4aadee42b5abdb9b50d44a9767457bb54 /hw/usb/dev-uas.c
parentqemu-option: clean up id vs. list->merge_lists (diff)
downloadqemu-afd736252f106ec54734d4e412220a978f668430.tar.gz
qemu-afd736252f106ec54734d4e412220a978f668430.tar.xz
qemu-afd736252f106ec54734d4e412220a978f668430.zip
qemu-option: move help handling to get_opt_name_value
Right now, help options are parsed normally and then checked specially in opt_validate, but only if coming from qemu_opts_parse_noisily. has_help_option does the check on its own. opt_validate() has two callers: qemu_opt_set(), which passes null and is therefore unaffected, and opts_do_parse(), which is affected. opts_do_parse() is called by qemu_opts_do_parse(), which passes null and is therefore unaffected, and opts_parse(). opts_parse() is called by qemu_opts_parse() and qemu_opts_set_defaults(), which pass null and are therefore unaffected, and qemu_opts_parse_noisily(). Move the check from opt_validate to the parsing workhorse of QemuOpts, get_opt_name_value. This will come in handy in the next patch, which will raise a warning for "-object memory-backend-ram,share" ("flag" option with no =on/=off part) but not for "-object memory-backend-ram,help". As a result: - opts_parse and opts_do_parse do not return an error anymore when help is requested; qemu_opts_parse_noisily does not have to work around that anymore. - various crazy ways to request help are not recognized anymore: - "help=..." - "nohelp" (sugar for "help=off") - "?=..." - "no?" (sugar for "?=off") - "help" would be recognized as help request even if there is a (foolishly named) parameter "help". No such parameters exist, though. Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/usb/dev-uas.c')
0 files changed, 0 insertions, 0 deletions