[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 2/2] monitor: suggest running "help" for command
From: |
Bandan Das |
Subject: |
[Qemu-devel] [PATCH v2 2/2] monitor: suggest running "help" for command errors |
Date: |
Tue, 26 May 2015 19:45:17 -0400 |
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 <address@hidden>
---
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