]> git.proxmox.com Git - mirror_qemu.git/commit
vl: Fix bogus error message for implied mon ID clashing
authorMarkus Armbruster <armbru@redhat.com>
Tue, 13 Jan 2015 13:19:13 +0000 (14:19 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 10 Feb 2015 06:27:20 +0000 (09:27 +0300)
commit46ede58bb461c1171251988e7fb1db6590350975
tree049ef886226ca86b424e530bea97a45da0a26443
parent15cae340094402bfe77565d7c6d09e2bb9d6601b
vl: Fix bogus error message for implied mon ID clashing

monitor_parse() desugars --monitor, --qmp and -qmp-pretty to --mon.
The ID it picks can clash with a user-specified ID.  When it happens,
the error message is misleading.

Reproducer:

    $ qemu --mon id=compat_monitor0 --monitor stdio

Message before the patch:

    duplicate chardev: compat_monitor0

There's no "duplicate chardev" here.  The problem is a duplicate
monitor ID.  Moreover, the message provides no clue which option
caused the problem.  The patch changes the message to:

    qemu: --monitor stdio: Duplicate ID 'compat_monitor0' for mon

monitor_parse() is also used for creating a default monitor, but
that's not done when the user specifies a monitor, so an ID clash is
impossible then.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
vl.c