diff options
-rw-r--r-- | sys/boot/i386/libi386/bootinfo.c | 10 | ||||
-rw-r--r-- | sys/boot/i386/libi386/libi386.h | 1 | ||||
-rw-r--r-- | sys/boot/i386/loader/main.c | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/sys/boot/i386/libi386/bootinfo.c b/sys/boot/i386/libi386/bootinfo.c index 41d0702..8a67e39 100644 --- a/sys/boot/i386/libi386/bootinfo.c +++ b/sys/boot/i386/libi386/bootinfo.c @@ -153,6 +153,16 @@ bi_getboothowto(char *kargs) return(howto); } +void +bi_setboothowto(int howto) +{ + int i; + + for (i = 0; howto_names[i].ev != NULL; i++) + if (howto & howto_names[i].mask) + setenv(howto_names[i].ev, "YES", 1); +} + /* * Copy the environment into the load area starting at (addr). * Each variable is formatted as <name>=<value>, with a single nul diff --git a/sys/boot/i386/libi386/libi386.h b/sys/boot/i386/libi386/libi386.h index c5d962a..670d2cb 100644 --- a/sys/boot/i386/libi386/libi386.h +++ b/sys/boot/i386/libi386/libi386.h @@ -106,6 +106,7 @@ void gateA20(void); int i386_autoload(void); int bi_getboothowto(char *kargs); +void bi_setboothowto(int howto); vm_offset_t bi_copyenv(vm_offset_t addr); int bi_load32(char *args, int *howtop, int *bootdevp, vm_offset_t *bip, vm_offset_t *modulep, vm_offset_t *kernend); diff --git a/sys/boot/i386/loader/main.c b/sys/boot/i386/loader/main.c index d8e61aa..ac31fd7 100644 --- a/sys/boot/i386/loader/main.c +++ b/sys/boot/i386/loader/main.c @@ -98,8 +98,8 @@ main(void) * We can use printf() etc. once this is done. * If the previous boot stage has requested a serial console, prefer that. */ + bi_setboothowto(initial_howto); if (initial_howto & RB_MULTIPLE) { - setenv("boot_multicons", "YES", 1); if (initial_howto & RB_SERIAL) setenv("console", "comconsole vidconsole", 1); else |