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.

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

diff --git a/monitor.c b/monitor.c
index 33d088e..640c05c 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4127,6 +4127,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


Reply via email to