From patchwork Fri Jun 14 11:15:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 251360 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A21D32C0095 for ; Fri, 14 Jun 2013 21:16:16 +1000 (EST) Received: from localhost ([::1]:52450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnRzK-0000r3-JG for incoming@patchwork.ozlabs.org; Fri, 14 Jun 2013 07:16:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnRyX-0000pL-3m for qemu-devel@nongnu.org; Fri, 14 Jun 2013 07:15:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnRyU-0004no-2R for qemu-devel@nongnu.org; Fri, 14 Jun 2013 07:15:25 -0400 Received: from oxygen.pond.sub.org ([2a01:4f8:121:10e4::3]:44193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnRyT-0004mQ-So for qemu-devel@nongnu.org; Fri, 14 Jun 2013 07:15:22 -0400 Received: from blackfin.pond.sub.org (p5B32AD34.dip0.t-ipconnect.de [91.50.173.52]) by oxygen.pond.sub.org (Postfix) with ESMTPA id D9BD79FF74; Fri, 14 Jun 2013 13:15:17 +0200 (CEST) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 427D5200B7; Fri, 14 Jun 2013 13:15:17 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Fri, 14 Jun 2013 13:15:04 +0200 Message-Id: <1371208516-7857-5-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1371208516-7857-1-git-send-email-armbru@redhat.com> References: <1371208516-7857-1-git-send-email-armbru@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:4f8:121:10e4::3 Cc: jan.kiszka@siemens.com, alex.williamson@redhat.com, aliguori@us.ibm.com, afaerber@suse.de, aviksil@linux.vnet.ibm.com Subject: [Qemu-devel] [PATCH v3 04/16] vl: Rename *boot_devices to *boot_order, for consistency X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Anthony Liguori --- include/hw/hw.h | 4 ++-- vl.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/hw/hw.h b/include/hw/hw.h index 1fb9afa..cc9f847 100644 --- a/include/hw/hw.h +++ b/include/hw/hw.h @@ -44,9 +44,9 @@ void qemu_unregister_reset(QEMUResetHandler *func, void *opaque); /* handler to set the boot_device order for a specific type of QEMUMachine */ /* return 0 if success */ -typedef int QEMUBootSetHandler(void *opaque, const char *boot_devices); +typedef int QEMUBootSetHandler(void *opaque, const char *boot_order); void qemu_register_boot_set(QEMUBootSetHandler *func, void *opaque); -int qemu_boot_set(const char *boot_devices); +int qemu_boot_set(const char *boot_order); #ifdef NEED_CPU_H #if TARGET_LONG_BITS == 64 diff --git a/vl.c b/vl.c index f51d8e8..17daedd 100644 --- a/vl.c +++ b/vl.c @@ -1151,12 +1151,12 @@ void qemu_register_boot_set(QEMUBootSetHandler *func, void *opaque) boot_set_opaque = opaque; } -int qemu_boot_set(const char *boot_devices) +int qemu_boot_set(const char *boot_order) { if (!boot_set_handler) { return -EINVAL; } - return boot_set_handler(boot_set_opaque, boot_devices); + return boot_set_handler(boot_set_opaque, boot_order); } static void validate_bootdevices(const char *devices) @@ -1187,9 +1187,9 @@ static void validate_bootdevices(const char *devices) } } -static void restore_boot_devices(void *opaque) +static void restore_boot_order(void *opaque) { - char *standard_boot_devices = opaque; + char *normal_boot_order = opaque; static int first = 1; /* Restore boot order and remove ourselves after the first boot */ @@ -1198,10 +1198,10 @@ static void restore_boot_devices(void *opaque) return; } - qemu_boot_set(standard_boot_devices); + qemu_boot_set(normal_boot_order); - qemu_unregister_reset(restore_boot_devices, standard_boot_devices); - g_free(standard_boot_devices); + qemu_unregister_reset(restore_boot_order, normal_boot_order); + g_free(normal_boot_order); } void add_boot_device_path(int32_t bootindex, DeviceState *dev, @@ -4090,7 +4090,7 @@ int main(int argc, char **argv, char **envp) validate_bootdevices(once); normal_boot_order = g_strdup(boot_order); boot_order = once; - qemu_register_reset(restore_boot_devices, normal_boot_order); + qemu_register_reset(restore_boot_order, normal_boot_order); } boot_menu = qemu_opt_get_bool(opts, "menu", boot_menu);