From 3b1e8d40d7340dfd7302053c712058ece8d42e93 Mon Sep 17 00:00:00 2001 From: Serge Vakulenko Date: Sun, 13 Sep 2015 02:21:03 -0700 Subject: [PATCH] Fix build errors. --- rootfs.manifest | 1 - src/cmd/stty/stty.1 | 15 ++++++++++++++- src/cmd/stty/stty.c | 3 +++ sys/include/ioctl.h | 2 ++ sys/kernel/tty.c | 7 +++++++ 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/rootfs.manifest b/rootfs.manifest index 91f1f42..8f934b2 100644 --- a/rootfs.manifest +++ b/rootfs.manifest @@ -781,7 +781,6 @@ file /include/machine/machparam.h file /include/machine/pic32mx.h file /include/machine/rd_sdramp_config.h file /include/machine/sdram.h -file /include/machine/ssd1926.h file /include/machine/usb_ch9.h file /include/machine/usb_device.h file /include/machine/usb_function_cdc.h diff --git a/src/cmd/stty/stty.1 b/src/cmd/stty/stty.1 index 76adb91..0fcce81 100644 --- a/src/cmd/stty/stty.1 +++ b/src/cmd/stty/stty.1 @@ -201,7 +201,8 @@ This character is an additional character causing wakeup. .TP 10 .B dec set all modes suitable for Digital Equipment Corp. operating systems -users; (erase, kill, and interrupt characters to ^?, ^U, and ^C, and ``crt''.) +users; (erase, kill, and interrupt characters to ^?, ^U, and ^C, +decctlq and ``crt''.) .ns .TP 10 .B 0 @@ -270,6 +271,18 @@ Print two backspaces following the EOT character (control D). Control characters echo as themselves; in cooked mode EOT (control-D) is not echoed. .TP 10 +.B decctlq +After output is suspended (normally by ^S), only a start character +(normally ^Q) will restart it. This is compatible with DEC's vendor +supplied systems. +.br +.ns +.TP 10 +.B \-decctlq +After output is suspended, any character typed will restart it; +the start character will restart output without providing any input. +(This is the default.) +.TP 10 .B tostop Background jobs stop if they attempt terminal output. .br diff --git a/src/cmd/stty/stty.c b/src/cmd/stty/stty.c index 58d91f8..2ec00a8 100644 --- a/src/cmd/stty/stty.c +++ b/src/cmd/stty/stty.c @@ -106,6 +106,8 @@ struct MODES lmodes[] = { "-ctlecho", 0, LCTLECH, "pendin", LPENDIN, 0, "-pendin", 0, LPENDIN, + "decctlq", LDECCTQ, 0, + "-decctlq", 0, LDECCTQ, "noflsh", LNOFLSH, 0, "-noflsh", 0, LNOFLSH, 0 @@ -430,6 +432,7 @@ prmodes(all) nothing = 0; } lpit(LPENDIN, "-pendin "); + lpit(LDECCTQ, "-decctlq "); lpit(LNOFLSH, "-noflsh "); if (any || nothing) fputc('\n', stderr); diff --git a/sys/include/ioctl.h b/sys/include/ioctl.h index ad542fe..4497311 100644 --- a/sys/include/ioctl.h +++ b/sys/include/ioctl.h @@ -161,6 +161,7 @@ struct ttysize { #define PASS8 0x08000000 #define CTLECH 0x10000000 /* echo control chars as ^X */ #define PENDIN 0x20000000 /* tp->t_rawq needs reread */ +#define DECCTQ 0x40000000 /* only ^Q starts after ^S */ #define NOFLSH 0x80000000 /* no output flush on signal */ /* locals, from 127 down */ #define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */ @@ -180,6 +181,7 @@ struct ttysize { #define LPASS8 ((int)(PASS8>>16)) #define LCTLECH ((int)(CTLECH>>16)) #define LPENDIN ((int)(PENDIN>>16)) +#define LDECCTQ ((int)(DECCTQ>>16)) #define LNOFLSH ((int)(NOFLSH>>16)) #define TIOCSBRK _IO ('t', 123) /* set break bit */ #define TIOCCBRK _IO ('t', 122) /* clear break bit */ diff --git a/sys/kernel/tty.c b/sys/kernel/tty.c index a06876c..a5fef87 100644 --- a/sys/kernel/tty.c +++ b/sys/kernel/tty.c @@ -1225,6 +1225,13 @@ erasenb: } } endcase: + /* + * If DEC-style start/stop is enabled don't restart + * output until seeing the start character. + */ + if (t_flags & DECCTQ && tp->t_state & TS_TTSTOP && + tp->t_startc != tp->t_stopc) + return; restartoutput: tp->t_state &= ~TS_TTSTOP; tp->t_flags &= ~FLUSHO;