From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0HJF-0006Sm-Ov for qemu-devel@nongnu.org; Wed, 03 Jun 2015 18:38:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0HJA-0008Nn-Kf for qemu-devel@nongnu.org; Wed, 03 Jun 2015 18:38:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43677) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0HJA-0008Ne-Fd for qemu-devel@nongnu.org; Wed, 03 Jun 2015 18:38:48 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 21E6E8EA4A for ; Wed, 3 Jun 2015 22:38:48 +0000 (UTC) From: Bandan Das Date: Wed, 3 Jun 2015 18:38:09 -0400 Message-Id: <1433371090-11781-4-git-send-email-bsd@redhat.com> In-Reply-To: <1433371090-11781-1-git-send-email-bsd@redhat.com> References: <1433371090-11781-1-git-send-email-bsd@redhat.com> Subject: [Qemu-devel] [PATCH v5 3/4] monitor: Point to "help" command on syntax error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: armbru@redhat.com 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 Reviewed-by: Markus Armbruster --- 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