stand: One more trivial consolidation (setting environment from howto)
This commit is contained in:
parent
246acad2cd
commit
00dbf98c39
@ -174,6 +174,16 @@ bootenv_flags()
|
||||
return (howto);
|
||||
}
|
||||
|
||||
void
|
||||
bootenv_set(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);
|
||||
}
|
||||
|
||||
static int
|
||||
autoboot(int timeout, char *prompt)
|
||||
{
|
||||
|
@ -64,6 +64,7 @@ int parse(int *argc, char ***argv, const char *str);
|
||||
void autoboot_maybe(void);
|
||||
int getrootmount(char *rootdev);
|
||||
int bootenv_flags(void);
|
||||
void bootenv_set(int);
|
||||
|
||||
/* misc.c */
|
||||
char *unargv(int argc, char *argv[]);
|
||||
|
@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/disk.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/boot.h>
|
||||
#include <stdint.h>
|
||||
#include <stand.h>
|
||||
#include <string.h>
|
||||
@ -549,9 +548,8 @@ main(int argc, CHAR16 *argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; howto_names[i].ev != NULL; i++)
|
||||
if (howto & howto_names[i].mask)
|
||||
setenv(howto_names[i].ev, "YES", 1);
|
||||
|
||||
bootenv_set(howto);
|
||||
|
||||
/*
|
||||
* XXX we need fallback to this stuff after looking at the ConIn, ConOut and ConErr variables
|
||||
|
@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/param.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/linker.h>
|
||||
#include <sys/boot.h>
|
||||
#include "bootstrap.h"
|
||||
#include "libi386.h"
|
||||
#include "btxv86.h"
|
||||
@ -130,11 +129,8 @@ bi_getboothowto(char *kargs)
|
||||
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);
|
||||
bootenv_set(howto);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/param.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/linker.h>
|
||||
#include <sys/boot.h>
|
||||
|
||||
#include "bootstrap.h"
|
||||
#include "libuserboot.h"
|
||||
@ -131,11 +130,8 @@ bi_getboothowto(char *kargs)
|
||||
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);
|
||||
bootenv_set(howto);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user