diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2010-12-29 11:37:41 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2010-12-29 13:26:45 -0500 |
commit | 3da2c1c12c5a432859d3c79d1a5c93f40b136966 (patch) | |
tree | a00846b49801646e9550f3576a56cf94ee431caa | |
parent | 7bb1584a2657815b1ca5b62d8919bc726dcca092 (diff) | |
download | seabios-3da2c1c12c5a432859d3c79d1a5c93f40b136966.tar.gz |
Move IPL.fw_bootorder to static variables in boot.c.
-rw-r--r-- | src/boot.c | 17 | ||||
-rw-r--r-- | src/boot.h | 10 |
2 files changed, 9 insertions, 18 deletions
@@ -14,13 +14,14 @@ #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); @@ -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); |