Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 May 2012 17:13:21 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r235409 - in stable/9/sys: dev/syscons i386/conf kern
Message-ID:  <201205131713.q4DHDL9d092691@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Sun May 13 17:13:21 2012
New Revision: 235409
URL: http://svn.freebsd.org/changeset/base/235409

Log:
  MFC r228767: sc_cngrab: switch to console vty when possible

Modified:
  stable/9/sys/dev/syscons/syscons.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)
  stable/9/sys/kern/subr_witness.c   (props changed)

Modified: stable/9/sys/dev/syscons/syscons.c
==============================================================================
--- stable/9/sys/dev/syscons/syscons.c	Sun May 13 17:11:49 2012	(r235408)
+++ stable/9/sys/dev/syscons/syscons.c	Sun May 13 17:13:21 2012	(r235409)
@@ -1615,7 +1615,14 @@ sc_cngrab(struct consdev *cp)
 {
     scr_stat *scp;
 
+    if (!cold &&
+	sc_console->sc->cur_scp->index != sc_console->index &&
+	sc_console->sc->cur_scp->smode.mode == VT_AUTO &&
+	sc_console->smode.mode == VT_AUTO)
+	    sc_switch_scr(sc_console->sc, sc_console->index);
+
     scp = sc_console->sc->cur_scp;
+
     if (scp->sc->kbd == NULL)
 	return;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205131713.q4DHDL9d092691>