aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBandan Das <bsd@redhat.com>2015-06-03 18:38:09 -0400
committerMarkus Armbruster <armbru@redhat.com>2015-06-22 17:40:00 +0200
commitdd41eea77129a4cd8ae5170b02e0fee175af314e (patch)
tree84822a129187fbc671f3a379ad11800a047a7e51
parentae50212ff717f3d295ebff352eb7d6cc08332b7e (diff)
monitor: Point to "help" command on syntax error
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 <bsd@redhat.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
-rw-r--r--monitor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index e29ac746e9..4c7faf9716 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4069,6 +4069,8 @@ static void handle_hmp_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;
}