summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-09-22 15:14:13 +0000
committerru <ru@FreeBSD.org>2005-09-22 15:14:13 +0000
commit923330aadca00e37e4ace02811887d2796c7518a (patch)
tree4a82beb0da78a5cbbeaa7121d8f3ea9a0818314f /sys
parenta3403464c071074e370ffd71b763b2f364ee49ae (diff)
downloadFreeBSD-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.
Diffstat (limited to 'sys')
-rw-r--r--sys/boot/i386/libi386/bootinfo.c10
-rw-r--r--sys/boot/i386/libi386/libi386.h1
-rw-r--r--sys/boot/i386/loader/main.c2
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
OpenPOWER on IntegriCloud