9ae3a8
From 1b91244eac9251bf754626c91f7455a437f33714 Mon Sep 17 00:00:00 2001
9ae3a8
Message-Id: <1b91244eac9251bf754626c91f7455a437f33714.1383564115.git.minovotn@redhat.com>
9ae3a8
In-Reply-To: <5575e0aec51f40ebec46e98ec085cda053283aba.1383564115.git.minovotn@redhat.com>
9ae3a8
References: <5575e0aec51f40ebec46e98ec085cda053283aba.1383564115.git.minovotn@redhat.com>
9ae3a8
From: Markus Armbruster <armbru@redhat.com>
9ae3a8
Date: Fri, 27 Sep 2013 13:31:14 +0200
9ae3a8
Subject: [PATCH 04/14] vl: Rename *boot_devices to *boot_order, for
9ae3a8
 consistency
9ae3a8
9ae3a8
RH-Author: Markus Armbruster <armbru@redhat.com>
9ae3a8
Message-id: <1380288680-26645-5-git-send-email-armbru@redhat.com>
9ae3a8
Patchwork-id: 54558
9ae3a8
O-Subject: [PATCH 7.0 qemu-kvm 04/10] vl: Rename *boot_devices to *boot_order, for consistency
9ae3a8
Bugzilla: 997817
9ae3a8
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
9ae3a8
9ae3a8
From: Markus Armbruster <armbru@redhat.com>
9ae3a8
9ae3a8
Signed-off-by: Markus Armbruster <armbru@redhat.com>
9ae3a8
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
9ae3a8
Message-id: 1371208516-7857-5-git-send-email-armbru@redhat.com
9ae3a8
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
9ae3a8
(cherry picked from commit 083b79c9fea0e3842f0b2b57ff0d20ab5f57084a)
9ae3a8
---
9ae3a8
 include/hw/hw.h |  4 ++--
9ae3a8
 vl.c            | 16 ++++++++--------
9ae3a8
 2 files changed, 10 insertions(+), 10 deletions(-)
9ae3a8
9ae3a8
Signed-off-by: Michal Novotny <minovotn@redhat.com>
9ae3a8
---
9ae3a8
 include/hw/hw.h |  4 ++--
9ae3a8
 vl.c            | 16 ++++++++--------
9ae3a8
 2 files changed, 10 insertions(+), 10 deletions(-)
9ae3a8
9ae3a8
diff --git a/include/hw/hw.h b/include/hw/hw.h
9ae3a8
index 1fb9afa..cc9f847 100644
9ae3a8
--- a/include/hw/hw.h
9ae3a8
+++ b/include/hw/hw.h
9ae3a8
@@ -44,9 +44,9 @@ void qemu_unregister_reset(QEMUResetHandler *func, void *opaque);
9ae3a8
 
9ae3a8
 /* handler to set the boot_device order for a specific type of QEMUMachine */
9ae3a8
 /* return 0 if success */
9ae3a8
-typedef int QEMUBootSetHandler(void *opaque, const char *boot_devices);
9ae3a8
+typedef int QEMUBootSetHandler(void *opaque, const char *boot_order);
9ae3a8
 void qemu_register_boot_set(QEMUBootSetHandler *func, void *opaque);
9ae3a8
-int qemu_boot_set(const char *boot_devices);
9ae3a8
+int qemu_boot_set(const char *boot_order);
9ae3a8
 
9ae3a8
 #ifdef NEED_CPU_H
9ae3a8
 #if TARGET_LONG_BITS == 64
9ae3a8
diff --git a/vl.c b/vl.c
9ae3a8
index 1c3236c..b8a8cc6 100644
9ae3a8
--- a/vl.c
9ae3a8
+++ b/vl.c
9ae3a8
@@ -1106,12 +1106,12 @@ void qemu_register_boot_set(QEMUBootSetHandler *func, void *opaque)
9ae3a8
     boot_set_opaque = opaque;
9ae3a8
 }
9ae3a8
 
9ae3a8
-int qemu_boot_set(const char *boot_devices)
9ae3a8
+int qemu_boot_set(const char *boot_order)
9ae3a8
 {
9ae3a8
     if (!boot_set_handler) {
9ae3a8
         return -EINVAL;
9ae3a8
     }
9ae3a8
-    return boot_set_handler(boot_set_opaque, boot_devices);
9ae3a8
+    return boot_set_handler(boot_set_opaque, boot_order);
9ae3a8
 }
9ae3a8
 
9ae3a8
 static void validate_bootdevices(const char *devices)
9ae3a8
@@ -1142,9 +1142,9 @@ static void validate_bootdevices(const char *devices)
9ae3a8
     }
9ae3a8
 }
9ae3a8
 
9ae3a8
-static void restore_boot_devices(void *opaque)
9ae3a8
+static void restore_boot_order(void *opaque)
9ae3a8
 {
9ae3a8
-    char *standard_boot_devices = opaque;
9ae3a8
+    char *normal_boot_order = opaque;
9ae3a8
     static int first = 1;
9ae3a8
 
9ae3a8
     /* Restore boot order and remove ourselves after the first boot */
9ae3a8
@@ -1153,10 +1153,10 @@ static void restore_boot_devices(void *opaque)
9ae3a8
         return;
9ae3a8
     }
9ae3a8
 
9ae3a8
-    qemu_boot_set(standard_boot_devices);
9ae3a8
+    qemu_boot_set(normal_boot_order);
9ae3a8
 
9ae3a8
-    qemu_unregister_reset(restore_boot_devices, standard_boot_devices);
9ae3a8
-    g_free(standard_boot_devices);
9ae3a8
+    qemu_unregister_reset(restore_boot_order, normal_boot_order);
9ae3a8
+    g_free(normal_boot_order);
9ae3a8
 }
9ae3a8
 
9ae3a8
 void add_boot_device_path(int32_t bootindex, DeviceState *dev,
9ae3a8
@@ -4046,7 +4046,7 @@ int main(int argc, char **argv, char **envp)
9ae3a8
             validate_bootdevices(once);
9ae3a8
             normal_boot_order = g_strdup(boot_order);
9ae3a8
             boot_order = once;
9ae3a8
-            qemu_register_reset(restore_boot_devices, normal_boot_order);
9ae3a8
+            qemu_register_reset(restore_boot_order, normal_boot_order);
9ae3a8
         }
9ae3a8
 
9ae3a8
         boot_menu = qemu_opt_get_bool(opts, "menu", boot_menu);
9ae3a8
-- 
9ae3a8
1.7.11.7
9ae3a8