From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzzMs-0000Y3-Bw for qemu-devel@nongnu.org; Tue, 02 Jun 2015 23:29:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzzMn-0000Q7-BV for qemu-devel@nongnu.org; Tue, 02 Jun 2015 23:29:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzzMn-0000Q3-7D for qemu-devel@nongnu.org; Tue, 02 Jun 2015 23:29:21 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id D2D1C8E3C3 for ; Wed, 3 Jun 2015 03:29:20 +0000 (UTC) From: Bandan Das Date: Tue, 2 Jun 2015 23:28:40 -0400 Message-Id: <1433302122-27397-3-git-send-email-bsd@redhat.com> In-Reply-To: <1433302122-27397-1-git-send-email-bsd@redhat.com> References: <1433302122-27397-1-git-send-email-bsd@redhat.com> 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. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: armbru@redhat.com 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 Signed-off-by: Bandan Das --- 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