xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Tue Apr 10 02:23:46 EEST 2007


 hw/xfree86/os-support/linux/lnx_init.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

New commits:
diff-tree a08d5157f70567a0aa9583d4a15e62437340cf34 (from 72b477f964c748a1ab668781643cc11877f19738)
Author: Adam Jackson <ajax at benzedrine.nwnk.net>
Date:   Mon Apr 9 19:04:56 2007 -0400

    VT activate or waitactive are fatal if they fail.
    
    Also, be sure to waitactive on the way down, to make sure we're off the VT
    before exiting.

diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 85b6def..9775180 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -245,15 +245,15 @@ xf86OpenConsole(void)
 	    lnx_savefont();
 #endif
 	    /*
-	     * now get the VT
+	     * now get the VT.  This _must_ succeed, or else fail completely.
 	     */
 	    if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0)
-	        xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed: %s\n",
-		        strerror(errno));
+	        FatalError("xf86OpenConsole: VT_ACTIVATE failed: %s\n",
+		           strerror(errno));
 
 	    if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) < 0)
-	        xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed: %s\n",
-		    strerror(errno));
+	        FatalError("xf86OpenConsole: VT_WAITACTIVE failed: %s\n",
+			   strerror(errno));
 
 	    if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
 	        FatalError("xf86OpenConsole: VT_GETMODE failed %s\n",
@@ -350,6 +350,10 @@ xf86CloseConsole()
 	    if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, activeVT) < 0)
 	        xf86Msg(X_WARNING, "xf86CloseConsole: VT_ACTIVATE failed: %s\n",
 		        strerror(errno));
+	    if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, activeVT) < 0)
+		xf86Msg(X_WARNING,
+			"xf86CloseConsole: VT_WAITACTIVE failed: %s\n",
+			strerror(errno));
 	    activeVT = -1;
         }
 



More information about the xorg-commit mailing list