Move IPL.fw_bootorder to static variables in boot.c.
authorKevin O'Connor <kevin@koconnor.net>
Wed, 29 Dec 2010 16:37:41 +0000 (11:37 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Wed, 29 Dec 2010 18:26:45 +0000 (13:26 -0500)
src/boot.c
src/boot.h

index 5ae418ca56ed26674bbeabc2da4158a842e17d53..9a395c6793df4a1390117bc851ea693742281d19 100644 (file)
 #include "cmos.h" // inb_cmos
 #include "paravirt.h"
 
-struct ipl_s IPL;
-
 
 /****************************************************************
  * Boot priority ordering
  ****************************************************************/
 
+static char **Bootorder;
+static int BootorderCount;
+
 static void
 loadBootOrder(void)
 {
@@ -29,14 +30,14 @@ loadBootOrder(void)
         return;
 
     int i;
-    IPL.fw_bootorder_count = 1;
+    BootorderCount = 1;
     while (f[i]) {
         if (f[i] == '\n')
-            IPL.fw_bootorder_count++;
+            BootorderCount++;
         i++;
     }
-    IPL.fw_bootorder = malloc_tmphigh(IPL.fw_bootorder_count*sizeof(char*));
-    if (!IPL.fw_bootorder) {
+    Bootorder = malloc_tmphigh(BootorderCount*sizeof(char*));
+    if (!Bootorder) {
         warn_noalloc();
         free(f);
         return;
@@ -45,12 +46,12 @@ loadBootOrder(void)
     dprintf(3, "boot order:\n");
     i = 0;
     do {
-        IPL.fw_bootorder[i] = f;
+        Bootorder[i] = f;
         f = strchr(f, '\n');
         if (f) {
             *f = '\0';
             f++;
-            dprintf(3, "%d: %s\n", i, IPL.fw_bootorder[i]);
+            dprintf(3, "%d: %s\n", i, Bootorder[i]);
             i++;
         }
     } while(f);
index 94b175db74c6b47b767ccac58601de67b3740874..107594bd06e1b56a391a9d19ab18dacaa14f5472 100644 (file)
@@ -2,16 +2,6 @@
 #ifndef __BOOT_H
 #define __BOOT_H
 
-struct ipl_s {
-    char **fw_bootorder;
-    int fw_bootorder_count;
-};
-
-
-/****************************************************************
- * Function defs
- ****************************************************************/
-
 // boot.c
 extern struct ipl_s IPL;
 void boot_setup(void);