From patchwork Tue Apr 6 22:22:08 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 49551 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 BA4FFB7D64 for ; Wed, 7 Apr 2010 08:24:42 +1000 (EST) Received: from localhost ([127.0.0.1]:47157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NzHCJ-0004KF-Rx for incoming@patchwork.ozlabs.org; Tue, 06 Apr 2010 18:24:39 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NzHAB-0003q6-HX for qemu-devel@nongnu.org; Tue, 06 Apr 2010 18:22:27 -0400 Received: from [140.186.70.92] (port=39661 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NzHA9-0003p1-Lv for qemu-devel@nongnu.org; Tue, 06 Apr 2010 18:22:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NzHA8-0005Eo-Cl for qemu-devel@nongnu.org; Tue, 06 Apr 2010 18:22:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15237) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzHA8-0005Db-4D for qemu-devel@nongnu.org; Tue, 06 Apr 2010 18:22:24 -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 o36MMFVW017363 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 6 Apr 2010 18:22:15 -0400 Received: from blackpad.lan.raisama.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o36MMCFO023782 for ; Tue, 6 Apr 2010 18:22:13 -0400 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id 025DA17FD94; Tue, 6 Apr 2010 19:22:09 -0300 (BRT) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Tue, 6 Apr 2010 19:22:08 -0300 Message-Id: <1270592528-23371-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1270592528-23371-1-git-send-email-ehabkost@redhat.com> References: <1270592528-23371-1-git-send-email-ehabkost@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. Subject: [Qemu-devel] [PATCH 3/3] boot: remove unused boot_devices_bitmap variable 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 In addition to removing the variable, this also renames the parse_bootdevices() function to validate_bootdevices(), as we don't need its return value anymore. Signed-off-by: Eduardo Habkost --- vl.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/vl.c b/vl.c index ea60bf4..41db7c5 100644 --- a/vl.c +++ b/vl.c @@ -1246,7 +1246,7 @@ int qemu_boot_set(const char *boot_devices) return boot_set_handler(boot_set_opaque, boot_devices); } -static int parse_bootdevices(char *devices) +static void validate_bootdevices(char *devices) { /* We just do some generic consistency checks */ const char *p; @@ -1272,7 +1272,6 @@ static int parse_bootdevices(char *devices) } bitmap |= 1 << (*p - 'a'); } - return bitmap; } static void restore_boot_devices(void *opaque) @@ -2619,7 +2618,6 @@ static const QEMUOption *lookup_opt(int argc, char **argv, int main(int argc, char **argv, char **envp) { const char *gdbstub_dev = NULL; - uint32_t boot_devices_bitmap = 0; int i; int snapshot, linux_boot; const char *icount_option = NULL; @@ -2938,13 +2936,13 @@ int main(int argc, char **argv, char **envp) if (legacy || get_param_value(buf, sizeof(buf), "order", optarg)) { - boot_devices_bitmap = parse_bootdevices(buf); + validate_bootdevices(buf); pstrcpy(boot_devices, sizeof(boot_devices), buf); } if (!legacy) { if (get_param_value(buf, sizeof(buf), "once", optarg)) { - boot_devices_bitmap |= parse_bootdevices(buf); + validate_bootdevices(buf); standard_boot_devices = qemu_strdup(boot_devices); pstrcpy(boot_devices, sizeof(boot_devices), buf); qemu_register_reset(restore_boot_devices,