yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-vl-Rename-boot_devices-to-boot_order-for-consistency.patch

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