From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxkcA-0000vJ-DH for qemu-devel@nongnu.org; Wed, 27 May 2015 19:19:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yxkc7-0007dw-6s for qemu-devel@nongnu.org; Wed, 27 May 2015 19:19:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxkc7-0007dq-1F for qemu-devel@nongnu.org; Wed, 27 May 2015 19:19:55 -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 BA9F08E708 for ; Wed, 27 May 2015 23:19:54 +0000 (UTC) From: Bandan Das Date: Wed, 27 May 2015 19:19:14 -0400 Message-Id: <1432768754-28523-3-git-send-email-bsd@redhat.com> In-Reply-To: <1432768754-28523-1-git-send-email-bsd@redhat.com> References: <1432768754-28523-1-git-send-email-bsd@redhat.com> Subject: [Qemu-devel] [PATCH v3 2/2] 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 521258d..2ed9fb7 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