svn commit: r366229 - head/sys/kern

Warner Losh imp at FreeBSD.org
Mon Sep 28 16:19:33 UTC 2020


Author: imp
Date: Mon Sep 28 16:19:29 2020
New Revision: 366229
URL: https://svnweb.freebsd.org/changeset/base/366229

Log:
  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

Modified:
  head/sys/kern/init_main.c

Modified: head/sys/kern/init_main.c
==============================================================================
--- head/sys/kern/init_main.c	Mon Sep 28 16:19:21 2020	(r366228)
+++ head/sys/kern/init_main.c	Mon Sep 28 16:19:29 2020	(r366229)
@@ -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)


More information about the svn-src-head mailing list