]> git.proxmox.com Git - mirror_qemu.git/commit - monitor.c
monitor: report entirety of hmp command on error
authorCollin Walling <walling@linux.ibm.com>
Mon, 7 May 2018 14:30:54 +0000 (10:30 -0400)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 21 Jun 2018 11:18:35 +0000 (12:18 +0100)
commit317c52cc6aa0d7b47fa156eb84857a339d0b4406
tree376ce35e6736828fb92199a7913d0741d96e719f
parent46012db666990ff2eed1d3dc199ab8006439a93b
monitor: report entirety of hmp command on error

When a user incorrectly provides an hmp command, an error response will be
printed that prompts the user to try "help <command name>". However, when
the command contains multiple parts e.g. "info uuid xyz", only the last
whitespace delimited string will be reported (in this example "info" will
be dropped and the message will read "Try "help uuid" for more information",
which is incorrect).

Let's correct this by capturing the entirety of the command from the command
line -- excluding any extraneous characters.

Reported-by: Mikhail Fokin <fokin@de.ibm.com>
Signed-off-by: Collin Walling <walling@linux.ibm.com>
Message-Id: <ee680f5e-ac9a-479d-f65e-9f8ae9cfe5d4@linux.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
monitor.c