]> git.proxmox.com Git - qemu.git/commit
Support 'help' as a synonym for '?' in command line options
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 2 Aug 2012 12:45:54 +0000 (13:45 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 2 Aug 2012 18:16:42 +0000 (13:16 -0500)
commitc8057f951d64de93bfd01569c0a725baa9f94372
treea923a40f0857c4de2e8feddbdadc4a2cc6d6bb59
parent02d2bd5d57812154cfb978bc2098cf49d551583d
Support 'help' as a synonym for '?' in command line options

For command line options which permit '?' meaning 'please list the
permitted values', add support for 'help' as a synonym, by abstracting
the check out into a helper function.

This change means that in some cases where we were being lazy in
our string parsing, "?junk" will now be rejected as an invalid option
rather than being (undocumentedly) treated the same way as "?".

Update the documentation to use 'help' rather than '?', since '?'
is a shell metacharacter and thus prone to fail confusingly if there
is a single character filename in the current working directory and
the '?' has not been escaped. It's therefore better to steer users
towards 'help', though '?' is retained for backwards compatibility.

We do not, however, update the output of the system emulator's -help
(or any documentation autogenerated from the qemu-options.hx which
is the source of the -help text) because libvirt parses our -help
output and will break. At a later date when QEMU provides a better
interface so libvirt can avoid having to do this, we can update the
-help text too.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
17 files changed:
arch_init.c
blockdev.c
bsd-user/main.c
hw/mips_jazz.c
hw/qdev-monitor.c
hw/watchdog.c
linux-user/main.c
net.c
qemu-common.h
qemu-doc.texi
qemu-ga.c
qemu-img.c
qemu-option.c
qemu-option.h
qemu-options.hx
qemu-timer.c
vl.c