Author: royger
Date: Thu Feb  6 14:02:47 2020
New Revision: 357616
URL: https://svnweb.freebsd.org/changeset/base/357616

Log:
  xen/console: fix priority of Xen console
  
  Currently the Xen console is always attached with priority CN_REMOTE
  (highest), which means that when booting with a single console the Xen
  console will take preference over the VGA for example, and that's not
  intended unless the user has also selected to use a serial console.
  
  Fix this by lowering the priority of the Xen console to NORMAL unless
  the user has selected to use a serial console. This keeps the usual
  FreeBSD behavior of outputting to the internal consoles (ie: VGA) when
  booted as a Xen dom0.
  
  MFC after:    3 days
  Sponsored by: Citrix Systems R&D

Modified:
  head/sys/dev/xen/console/xen_console.c

Modified: head/sys/dev/xen/console/xen_console.c
==============================================================================
--- head/sys/dev/xen/console/xen_console.c      Thu Feb  6 13:21:59 2020        
(r357615)
+++ head/sys/dev/xen/console/xen_console.c      Thu Feb  6 14:02:47 2020        
(r357616)
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/cons.h>
 #include <sys/kdb.h>
 #include <sys/proc.h>
+#include <sys/reboot.h>
 
 #include <machine/stdarg.h>
 
@@ -590,7 +591,7 @@ xencons_cnprobe(struct consdev *cp)
        if (!xen_domain())
                return;
 
-       cp->cn_pri = CN_REMOTE;
+       cp->cn_pri = (boothowto & RB_SERIAL) ? CN_REMOTE : CN_NORMAL;
        sprintf(cp->cn_name, "%s0", driver_name);
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to