Received: from [140.186.70.92] (port=37566 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUPKu-0006Q6-Gx for qemu-devel@nongnu.org; Thu, 01 Jul 2010 15:22:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUPKk-0007HV-P0 for qemu-devel@nongnu.org; Thu, 01 Jul 2010 15:22:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31471) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUPKk-0007HD-Hv for qemu-devel@nongnu.org; Thu, 01 Jul 2010 15:22:02 -0400 From: Luiz Capitulino Date: Thu, 1 Jul 2010 16:21:30 -0300 Message-Id: <1278012111-26227-3-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1278012111-26227-1-git-send-email-lcapitulino@redhat.com> References: <1278012111-26227-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 02/23] monitor: Fix command completion vs. boolean switches List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: Jan Kiszka , qemu-devel@nongnu.org From: Jan Kiszka We now have to move forward to the next argument type via next_arg_type. This patch fixes completion for 'eject' and maybe also other commands. Signed-off-by: Jan Kiszka Signed-off-by: Luiz Capitulino --- monitor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c index 42ae154..b375f10 100644 --- a/monitor.c +++ b/monitor.c @@ -3918,7 +3918,7 @@ static void monitor_find_completion(const char *cmdline) } str = args[nb_args - 1]; if (*ptype == '-' && ptype[1] != '\0') { - ptype += 2; + ptype = next_arg_type(ptype); } switch(*ptype) { case 'F': -- 1.7.2.rc0