aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2020-09-28 16:19:29 +0000
committerWarner Losh <imp@FreeBSD.org>2020-09-28 16:19:29 +0000
commitab3f5b6ef2ea7545ccc75786e3bde38a03f0232d (patch)
treed3d7d65a47edd5589f24b722b5db4dff47856ac6 /sys/kern/init_main.c
parent8f3b36103b20049e207e64039ad3e99ffb5b51e2 (diff)
downloadsrc-ab3f5b6ef2ea7545ccc75786e3bde38a03f0232d.tar.gz
src-ab3f5b6ef2ea7545ccc75786e3bde38a03f0232d.zip
For mulitcons boot, report it and which console is primary
Until we can do proper /etc/rc output on both consoles in multicons boot (or all of them if we ever generalize), report when we are booting multicons. Also report the primary console. This will be a big hint why output stops after this line (though some slow USB discovery still happens after mountroot / init starts). Reviewed by: scottl@, tsoome@ Differential Revision: https://reviews.freebsd.org/D26574
Notes
Notes: svn path=/head/; revision=366229
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 045e2797a2f4..2f9919a7dca9 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -715,6 +715,14 @@ start_init(void *dummy)
/* Wipe GELI passphrase from the environment. */
kern_unsetenv("kern.geom.eli.passphrase");
+ /* For Multicons, report which console is primary to both */
+ if (boothowto & RB_MULTIPLE) {
+ if (boothowto & RB_SERIAL)
+ printf("Dual Console: Serial Primary, Video Secondary\n");
+ else
+ printf("Dual Console: Video Primary, Serial Secondary\n");
+ }
+
if ((var = kern_getenv("init_path")) != NULL) {
strlcpy(init_path, var, sizeof(init_path));
freeenv(var);
@@ -724,7 +732,7 @@ start_init(void *dummy)
while ((path = strsep(&tmp_init_path, ":")) != NULL) {
if (bootverbose)
printf("start_init: trying %s\n", path);
-
+
memset(&args, 0, sizeof(args));
error = exec_alloc_args(&args);
if (error != 0)