diff mbox

[v3,2/2] 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.

Message ID 1432768754-28523-3-git-send-email-bsd@redhat.com
State New
Headers show

Commit Message

Bandan Das May 27, 2015, 11:19 p.m. UTC
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

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Bandan Das <bsd@redhat.com>
---
 monitor.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/monitor.c b/monitor.c
index 521258d..2ed9fb7 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4134,6 +4134,8 @@  static void handle_user_command(Monitor *mon, const char *cmdline)
 
     qdict = monitor_parse_arguments(mon, &cmdline, cmd);
     if (!qdict) {
+        monitor_printf(mon, "Try \"help %s\" for more information\n",
+                       cmd->name);
         return;
     }