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
This commit is contained in:
Warner Losh 2020-09-28 16:19:29 +00:00
parent 8f3b36103b
commit ab3f5b6ef2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=366229

View File

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