[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 2/4] When a command fails due to incorrect syntax
From: |
Bandan Das |
Subject: |
[Qemu-devel] [PATCH v4 2/4] 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. |
Date: |
Tue, 2 Jun 2015 23:28:40 -0400 |
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 <address@hidden>
Signed-off-by: Bandan Das <address@hidden>
---
monitor.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/monitor.c b/monitor.c
index a89cbbb..6777cbe 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;
}
--
2.1.0