From patchwork Thu Jul 1 19:21:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 57571 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DC106B70BF for ; Fri, 2 Jul 2010 05:23:56 +1000 (EST) Received: from localhost ([127.0.0.1]:59408 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUPMY-0006UF-0a for incoming@patchwork.ozlabs.org; Thu, 01 Jul 2010 15:23:54 -0400 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 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o61JM1I5024594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Jul 2010 15:22:01 -0400 Received: from localhost (vpn-10-238.rdu.redhat.com [10.11.10.238]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o61JM0tZ014323; Thu, 1 Jul 2010 15:22:01 -0400 From: Luiz Capitulino To: aliguori@us.ibm.com 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> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Jan Kiszka , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 02/23] monitor: Fix command completion vs. boolean switches X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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':