aboutsummaryrefslogtreecommitdiff
path: root/stand/userboot
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2018-07-13 16:43:23 +0000
committerWarner Losh <imp@FreeBSD.org>2018-07-13 16:43:23 +0000
commit4569e91328cd8d92f8d3da9bdd299222de185c3e (patch)
tree418342a6f3a5e3b2e00d94c66cb8eed7c7f9119f /stand/userboot
parenteed42ff1d5fcb63a9492db2e9572058fe843fb78 (diff)
Notes
Diffstat (limited to 'stand/userboot')
-rw-r--r--stand/userboot/userboot/bootinfo.c58
1 files changed, 4 insertions, 54 deletions
diff --git a/stand/userboot/userboot/bootinfo.c b/stand/userboot/userboot/bootinfo.c
index 29a94af1752f..0aeb4ee496d7 100644
--- a/stand/userboot/userboot/bootinfo.c
+++ b/stand/userboot/userboot/bootinfo.c
@@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$");
#include <stand.h>
#include <sys/param.h>
#include <sys/reboot.h>
+#include <sys/boot.h>
#include <sys/linker.h>
#include "bootstrap.h"
@@ -38,63 +39,11 @@ __FBSDID("$FreeBSD$");
int
bi_getboothowto(char *kargs)
{
- char *cp;
char *curpos, *next, *string;
int howto;
- int active;
int vidconsole;
- /* Parse kargs */
- howto = 0;
- if (kargs != NULL) {
- cp = kargs;
- active = 0;
- while (*cp != 0) {
- if (!active && (*cp == '-')) {
- active = 1;
- } else if (active)
- switch (*cp) {
- case 'a':
- howto |= RB_ASKNAME;
- break;
- case 'C':
- howto |= RB_CDROM;
- break;
- case 'd':
- howto |= RB_KDB;
- break;
- case 'D':
- howto |= RB_MULTIPLE;
- break;
- case 'm':
- howto |= RB_MUTE;
- break;
- case 'g':
- howto |= RB_GDB;
- break;
- case 'h':
- howto |= RB_SERIAL;
- break;
- case 'p':
- howto |= RB_PAUSE;
- break;
- case 'r':
- howto |= RB_DFLTROOT;
- break;
- case 's':
- howto |= RB_SINGLE;
- break;
- case 'v':
- howto |= RB_VERBOSE;
- break;
- default:
- active = 0;
- break;
- }
- cp++;
- }
- }
-
+ howto = boot_parse_cmdline(kargs);
howto |= bootenv_flags();
/* Enable selected consoles */
@@ -117,7 +66,8 @@ bi_getboothowto(char *kargs)
/*
* XXX: Note that until the kernel is ready to respect multiple consoles
- * for the boot messages, the first named console is the primary console
+ * for the messages from /etc/rc, the first named console is the primary
+ * console
*/
if (!strcmp(string, "vidconsole"))
howto &= ~RB_SERIAL;