diff options
author | ru <ru@FreeBSD.org> | 2005-09-22 15:14:13 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2005-09-22 15:14:13 +0000 |
commit | 923330aadca00e37e4ace02811887d2796c7518a (patch) | |
tree | 4a82beb0da78a5cbbeaa7121d8f3ea9a0818314f | |
parent | a3403464c071074e370ffd71b763b2f364ee49ae (diff) | |
download | FreeBSD-src-923330aadca00e37e4ace02811887d2796c7518a.zip FreeBSD-src-923330aadca00e37e4ace02811887d2796c7518a.tar.gz |
Cause all flags passed by boot2 to set the respective loader(8)
boot_* variable. The end effect is that all flags from boot2
are now passed to the kernel.
-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 |