Differential D7588 Diff 25394 x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_bsd_init.c
Changeset View
Changeset View
Standalone View
Standalone View
x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_bsd_init.c
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- hw/xfree86/os-support/bsd/bsd_init.c.orig 2015-08-03 17:44:08.000000000 +0300 | |||||
+++ hw/xfree86/os-support/bsd/bsd_init.c 2016-10-16 12:41:09.231720000 +0300 | |||||
@@ -48,6 +48,7 @@ static int devConsoleFd = -1; | |||||
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) | |||||
static int VTnum = -1; | |||||
static int initialVT = -1; | |||||
+static struct termios tty_attr; | |||||
#endif | |||||
#ifdef PCCONS_SUPPORT | |||||
@@ -253,6 +254,7 @@ xf86OpenConsole() | |||||
#endif | |||||
acquire_vt: | |||||
if (!xf86Info.ShareVTs) { | |||||
+ struct termios nTty; | |||||
/* | |||||
* now get the VT | |||||
*/ | |||||
@@ -287,6 +289,18 @@ xf86OpenConsole() | |||||
if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0) { | |||||
FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed"); | |||||
} | |||||
+ | |||||
+ tcgetattr(xf86Info.consoleFd, &tty_attr); | |||||
+ nTty = tty_attr; | |||||
+ nTty.c_iflag = IGNPAR | IGNBRK; | |||||
+ nTty.c_oflag = 0; | |||||
+ nTty.c_cflag = CREAD | CS8; | |||||
+ nTty.c_lflag = 0; | |||||
+ nTty.c_cc[VTIME] = 0; | |||||
+ nTty.c_cc[VMIN] = 1; | |||||
+ cfsetispeed(&nTty, 9600); | |||||
+ cfsetospeed(&nTty, 9600); | |||||
+ tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty); | |||||
} | |||||
else { /* xf86Info.ShareVTs */ | |||||
close(xf86Info.consoleFd); | |||||
@@ -594,6 +608,7 @@ xf86CloseConsole() | |||||
case SYSCONS: | |||||
case PCVT: | |||||
ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT); /* Back to text mode */ | |||||
+ tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr); | |||||
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) { | |||||
VT.mode = VT_AUTO; | |||||
ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* dflt vt handling */ |