svn commit: r366423 - stable/12/sys/kern

Warner Losh imp at FreeBSD.org
Sun Oct 4 06:14:52 UTC 2020


Author: imp
Date: Sun Oct  4 06:14:51 2020
New Revision: 366423
URL: https://svnweb.freebsd.org/changeset/base/366423

Log:
  MFC: r366229
  
  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:
  stable/12/sys/kern/init_main.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/init_main.c
==============================================================================
--- stable/12/sys/kern/init_main.c	Sun Oct  4 06:12:52 2020	(r366422)
+++ stable/12/sys/kern/init_main.c	Sun Oct  4 06:14:51 2020	(r366423)
@@ -743,6 +743,14 @@ start_init(void *dummy)
 	p->p_vmspace->vm_maxsaddr = (caddr_t)addr;
 	p->p_vmspace->vm_ssize = 1;
 
+	/* 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);
@@ -753,7 +761,7 @@ start_init(void *dummy)
 		pathlen = strlen(path) + 1;
 		if (bootverbose)
 			printf("start_init: trying %s\n", path);
-			
+
 		/*
 		 * Move out the boot flag argument.
 		 */


More information about the svn-src-all mailing list