aboutsummaryrefslogtreecommitdiff
path: root/stand/efi/loader/bootinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'stand/efi/loader/bootinfo.c')
-rw-r--r--stand/efi/loader/bootinfo.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c
index 43db6d7cfab1..f432a3734dc9 100644
--- a/stand/efi/loader/bootinfo.c
+++ b/stand/efi/loader/bootinfo.c
@@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/linker.h>
#include <sys/reboot.h>
+#include <sys/boot.h>
#include <machine/cpufunc.h>
#include <machine/elf.h>
#include <machine/metadata.h>
@@ -59,12 +60,6 @@ int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp);
extern EFI_SYSTEM_TABLE *ST;
-static const char howto_switches[] = "aCdrgDmphsv";
-static int howto_masks[] = {
- RB_ASKNAME, RB_CDROM, RB_KDB, RB_DFLTROOT, RB_GDB, RB_MULTIPLE,
- RB_MUTE, RB_PAUSE, RB_SERIAL, RB_SINGLE, RB_VERBOSE
-};
-
static int
bi_getboothowto(char *kargs)
{
@@ -73,7 +68,8 @@ bi_getboothowto(char *kargs)
char *console;
int howto;
- howto = bootenv_flags();
+ howto = boot_parse_cmdline(kargs);
+ howto |= boot_env_to_howto();
console = getenv("console");
if (console != NULL) {
@@ -83,21 +79,6 @@ bi_getboothowto(char *kargs)
howto |= RB_MUTE;
}
- /* Parse kargs */
- if (kargs == NULL)
- return (howto);
-
- opts = strchr(kargs, '-');
- while (opts != NULL) {
- while (*(++opts) != '\0') {
- sw = strchr(howto_switches, *opts);
- if (sw == NULL)
- break;
- howto |= howto_masks[sw - howto_switches];
- }
- opts = strchr(opts, '-');
- }
-
return (howto);
}