mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user