From: Bandan Das <bsd@redhat.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com
Subject: [Qemu-devel] [PATCH v2 2/2] monitor: suggest running "help" for command errors
Date: Tue, 26 May 2015 19:45:17 -0400 [thread overview]
Message-ID: <1432683917-19906-3-git-send-email-bsd@redhat.com> (raw)
In-Reply-To: <1432683917-19906-1-git-send-email-bsd@redhat.com>
When a command fails due to incorrect syntax or input,
suggest using the "help" command to get more information
about the command. This is only applicable for HMP.
Before:
(qemu) drive_add usb_flash_drive
drive_add: string expected
After:
(qemu) drive_add usb_flash_drive
drive_add: string expected
Try "help drive_add" for more information
Signed-off-by: Bandan Das <bsd@redhat.com>
---
monitor.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/monitor.c b/monitor.c
index f0c1a8c..af73195 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4138,6 +4138,8 @@ static void handle_user_command(Monitor *mon, const char *cmdline)
qdict = monitor_parse_arguments(mon, cmdline, &start, cmd);
if (!qdict) {
+ monitor_printf(mon, "Try \"help %s\" for more information\n",
+ cmd->name);
return;
}
--
2.1.0
next prev parent reply other threads:[~2015-05-26 23:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-26 23:45 [Qemu-devel] [PATCH v2 0/2] monitor: suggest running "help" for command errors Bandan Das
2015-05-26 23:45 ` [Qemu-devel] [PATCH v2 1/2] monitor: cleanup parsing of cmd name and cmd arguments Bandan Das
2015-05-27 8:10 ` Markus Armbruster
2015-05-26 23:45 ` Bandan Das [this message]
2015-05-27 8:11 ` [Qemu-devel] [PATCH v2 2/2] monitor: suggest running "help" for command errors Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1432683917-19906-3-git-send-email-bsd@redhat.com \
--to=bsd@redhat.com \
--cc=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).