Patchwork [4/5] vl: Rename *boot_devices to *boot_order, for consistency

login
register
mail settings
Submitter Markus Armbruster
Date Feb. 20, 2013, 4:55 p.m.
Message ID <1361379337-15044-5-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/222143/
State New
Headers show

Comments

Markus Armbruster - Feb. 20, 2013, 4:55 p.m.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/hw.h |  4 ++--
 vl.c    | 16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)

Patch

diff --git a/hw/hw.h b/hw/hw.h
index dfced97..20dc0d6 100644
--- a/hw/hw.h
+++ b/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 33e4116..fb16ec8 100644
--- a/vl.c
+++ b/vl.c
@@ -1112,12 +1112,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)
@@ -1148,9 +1148,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 */
@@ -1159,10 +1159,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,
@@ -4006,7 +4006,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);