mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-15 09:10:37 +01:00
xfree86: don't restore the TTY mode if we didn't initialize it ourselves
Restoring it unconditionally means we restore to whatever tty_mode has as
default value (i.e. 0). K_RAW happens to be 0x00, so we always restore to raw
mode if allowEmptyInput is off.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit aea6f19f25)
This commit is contained in:
parent
3c11efd7dc
commit
1ffd9ec760
1 changed files with 4 additions and 2 deletions
|
|
@ -376,8 +376,10 @@ xf86CloseConsole()
|
|||
xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n",
|
||||
strerror(errno));
|
||||
|
||||
ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode);
|
||||
tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);
|
||||
if (xf86Info.allowEmptyInput) {
|
||||
ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode);
|
||||
tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);
|
||||
}
|
||||
|
||||
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
|
||||
xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETMODE failed: %s\n",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue