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.
This commit is contained in:
Ruslan Ermilov 2005-09-22 15:14:13 +00:00
parent 4750e08f7b
commit fddd9c1d2f
3 changed files with 12 additions and 1 deletions

View File

@ -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

View File

@ -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);

View File

@ -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