From patchwork Tue Jun 15 22:38:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 55827 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 34AD6B7D8B for ; Wed, 16 Jun 2010 09:35:33 +1000 (EST) Received: from localhost ([127.0.0.1]:36750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOfBj-0008AJ-1z for incoming@patchwork.ozlabs.org; Tue, 15 Jun 2010 19:04:59 -0400 Received: from [140.186.70.92] (port=33407 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOemn-0007yx-6m for qemu-devel@nongnu.org; Tue, 15 Jun 2010 18:39:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOemi-0005XH-Lc for qemu-devel@nongnu.org; Tue, 15 Jun 2010 18:39:13 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:51486) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOemi-0005Wj-FG for qemu-devel@nongnu.org; Tue, 15 Jun 2010 18:39:08 -0400 Received: from smtp04.web.de ( [172.20.0.225]) by fmmailgate03.web.de (Postfix) with ESMTP id B3008156935DD; Wed, 16 Jun 2010 00:39:07 +0200 (CEST) Received: from [92.74.52.35] (helo=localhost.localdomain) by smtp04.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #4) id 1OOemh-0003C9-02; Wed, 16 Jun 2010 00:39:07 +0200 From: Jan Kiszka To: qemu-devel@nongnu.org, Anthony Liguori Date: Wed, 16 Jun 2010 00:38:34 +0200 Message-Id: <9518eafba99d70356f4a84aa2e5b91a18cb99e90.1276641524.git.jan.kiszka@web.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: References: In-Reply-To: References: X-Sender: jan.kiszka@web.de X-Provags-ID: V01U2FsdGVkX18d6e6wRhOFzeNA+sgdzzGPn0zBjPmLfd/r0wSt c4GPkyX46kVEQjtNJRuKEX+fVXjv6gGgQ/r5vsIerdzDSccE8w UoOyQY5OA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Cc: Juan Quintela , Jan Kiszka , Markus Armbruster , Luiz Capitulino , Blue Swirl , Avi Kivity Subject: [Qemu-devel] [PATCH v4 10/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 --- monitor.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c index 242aee6..c1006b4 100644 --- a/monitor.c +++ b/monitor.c @@ -3913,7 +3913,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':