diff options
author | hyc@symas.com <hyc@symas.com> | 2010-06-22 13:14:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 16:47:39 -0400 |
commit | 26df6d13406d1a53b0bda08bd712f1924affd7cd (patch) | |
tree | db17328acbd7cac9dc20bc854509527c1c89ca01 /arch | |
parent | a3c8ed693da9782f924223f65da9261da796e49b (diff) |
tty: Add EXTPROC support for LINEMODE
This patch is against the 2.6.34 source.
Paraphrased from the 1989 BSD patch by David Borman @ cray.com:
These are the changes needed for the kernel to support
LINEMODE in the server.
There is a new bit in the termios local flag word, EXTPROC.
When this bit is set, several aspects of the terminal driver
are disabled. Input line editing, character echo, and mapping
of signals are all disabled. This allows the telnetd to turn
off these functions when in linemode, but still keep track of
what state the user wants the terminal to be in.
New ioctl:
TIOCSIG Generate a signal to processes in the
current process group of the pty.
There is a new mode for packet driver, the TIOCPKT_IOCTL bit.
When packet mode is turned on in the pty, and the EXTPROC bit
is set, then whenever the state of the pty is changed, the
next read on the master side of the pty will have the TIOCPKT_IOCTL
bit set. This allows the process on the server side of the pty
to know when the state of the terminal has changed; it can then
issue the appropriate ioctl to retrieve the new state.
Since the original BSD patches accompanied the source code for telnet
I've left that reference here, but obviously the feature is useful for
any remote terminal protocol, including ssh.
The corresponding feature has existed in the BSD tty driver since 1989.
For historical reference, a good copy of the relevant files can be found
here:
http://anonsvn.mit.edu/viewvc/krb5/trunk/src/appl/telnet/?pathrev=17741
Signed-off-by: Howard Chu <hyc@symas.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
32 files changed, 49 insertions, 1 deletions
diff --git a/arch/alpha/include/asm/ioctls.h b/arch/alpha/include/asm/ioctls.h index c7b0cc61ce5b..59617c3c2be6 100644 --- a/arch/alpha/include/asm/ioctls.h +++ b/arch/alpha/include/asm/ioctls.h | |||
@@ -80,6 +80,7 @@ | |||
80 | # define TIOCPKT_START 8 | 80 | # define TIOCPKT_START 8 |
81 | # define TIOCPKT_NOSTOP 16 | 81 | # define TIOCPKT_NOSTOP 16 |
82 | # define TIOCPKT_DOSTOP 32 | 82 | # define TIOCPKT_DOSTOP 32 |
83 | # define TIOCPKT_IOCTL 64 | ||
83 | 84 | ||
84 | 85 | ||
85 | #define TIOCNOTTY 0x5422 | 86 | #define TIOCNOTTY 0x5422 |
@@ -91,6 +92,7 @@ | |||
91 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | 92 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ |
92 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 93 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
93 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 94 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
95 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
94 | 96 | ||
95 | #define TIOCSERCONFIG 0x5453 | 97 | #define TIOCSERCONFIG 0x5453 |
96 | #define TIOCSERGWILD 0x5454 | 98 | #define TIOCSERGWILD 0x5454 |
diff --git a/arch/alpha/include/asm/termbits.h b/arch/alpha/include/asm/termbits.h index ad854a4a3af6..879dd3589921 100644 --- a/arch/alpha/include/asm/termbits.h +++ b/arch/alpha/include/asm/termbits.h | |||
@@ -180,6 +180,7 @@ struct ktermios { | |||
180 | #define FLUSHO 0x00800000 | 180 | #define FLUSHO 0x00800000 |
181 | #define PENDIN 0x20000000 | 181 | #define PENDIN 0x20000000 |
182 | #define IEXTEN 0x00000400 | 182 | #define IEXTEN 0x00000400 |
183 | #define EXTPROC 0x10000000 | ||
183 | 184 | ||
184 | /* Values for the ACTION argument to `tcflow'. */ | 185 | /* Values for the ACTION argument to `tcflow'. */ |
185 | #define TCOOFF 0 | 186 | #define TCOOFF 0 |
diff --git a/arch/arm/include/asm/ioctls.h b/arch/arm/include/asm/ioctls.h index 7f0b6d13296a..0b30894b5482 100644 --- a/arch/arm/include/asm/ioctls.h +++ b/arch/arm/include/asm/ioctls.h | |||
@@ -52,6 +52,7 @@ | |||
52 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | 52 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) |
53 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 53 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
54 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 54 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
55 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
55 | 56 | ||
56 | #define TIOCGRS485 0x542E | 57 | #define TIOCGRS485 0x542E |
57 | #define TIOCSRS485 0x542F | 58 | #define TIOCSRS485 0x542F |
@@ -81,6 +82,7 @@ | |||
81 | #define TIOCPKT_START 8 | 82 | #define TIOCPKT_START 8 |
82 | #define TIOCPKT_NOSTOP 16 | 83 | #define TIOCPKT_NOSTOP 16 |
83 | #define TIOCPKT_DOSTOP 32 | 84 | #define TIOCPKT_DOSTOP 32 |
85 | #define TIOCPKT_IOCTL 64 | ||
84 | 86 | ||
85 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 87 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
86 | 88 | ||
diff --git a/arch/arm/include/asm/termbits.h b/arch/arm/include/asm/termbits.h index f784d11f40b5..704135d28d1d 100644 --- a/arch/arm/include/asm/termbits.h +++ b/arch/arm/include/asm/termbits.h | |||
@@ -177,6 +177,7 @@ struct ktermios { | |||
177 | #define FLUSHO 0010000 | 177 | #define FLUSHO 0010000 |
178 | #define PENDIN 0040000 | 178 | #define PENDIN 0040000 |
179 | #define IEXTEN 0100000 | 179 | #define IEXTEN 0100000 |
180 | #define EXTPROC 0200000 | ||
180 | 181 | ||
181 | /* tcflow() and TCXONC use these */ | 182 | /* tcflow() and TCXONC use these */ |
182 | #define TCOOFF 0 | 183 | #define TCOOFF 0 |
diff --git a/arch/avr32/include/asm/ioctls.h b/arch/avr32/include/asm/ioctls.h index 143dafb3997e..b7dd324b46a9 100644 --- a/arch/avr32/include/asm/ioctls.h +++ b/arch/avr32/include/asm/ioctls.h | |||
@@ -53,6 +53,7 @@ | |||
53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | 53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) |
54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
56 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
56 | 57 | ||
57 | #define TIOCGRS485 0x542E | 58 | #define TIOCGRS485 0x542E |
58 | #define TIOCSRS485 0x542F | 59 | #define TIOCSRS485 0x542F |
@@ -82,6 +83,7 @@ | |||
82 | #define TIOCPKT_START 8 | 83 | #define TIOCPKT_START 8 |
83 | #define TIOCPKT_NOSTOP 16 | 84 | #define TIOCPKT_NOSTOP 16 |
84 | #define TIOCPKT_DOSTOP 32 | 85 | #define TIOCPKT_DOSTOP 32 |
86 | #define TIOCPKT_IOCTL 64 | ||
85 | 87 | ||
86 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 88 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
87 | 89 | ||
diff --git a/arch/avr32/include/asm/termbits.h b/arch/avr32/include/asm/termbits.h index db2daab31fdb..366adc5ebb10 100644 --- a/arch/avr32/include/asm/termbits.h +++ b/arch/avr32/include/asm/termbits.h | |||
@@ -175,6 +175,7 @@ struct ktermios { | |||
175 | #define FLUSHO 0010000 | 175 | #define FLUSHO 0010000 |
176 | #define PENDIN 0040000 | 176 | #define PENDIN 0040000 |
177 | #define IEXTEN 0100000 | 177 | #define IEXTEN 0100000 |
178 | #define EXTPROC 0200000 | ||
178 | 179 | ||
179 | /* tcflow() and TCXONC use these */ | 180 | /* tcflow() and TCXONC use these */ |
180 | #define TCOOFF 0 | 181 | #define TCOOFF 0 |
diff --git a/arch/cris/include/asm/ioctls.h b/arch/cris/include/asm/ioctls.h index bb49142dc6ab..c9129ed37443 100644 --- a/arch/cris/include/asm/ioctls.h +++ b/arch/cris/include/asm/ioctls.h | |||
@@ -54,6 +54,7 @@ | |||
54 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | 54 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) |
55 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 55 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
56 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 56 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
57 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
57 | 58 | ||
58 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | 59 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ |
59 | #define FIOCLEX 0x5451 | 60 | #define FIOCLEX 0x5451 |
@@ -85,6 +86,7 @@ | |||
85 | #define TIOCPKT_START 8 | 86 | #define TIOCPKT_START 8 |
86 | #define TIOCPKT_NOSTOP 16 | 87 | #define TIOCPKT_NOSTOP 16 |
87 | #define TIOCPKT_DOSTOP 32 | 88 | #define TIOCPKT_DOSTOP 32 |
89 | #define TIOCPKT_IOCTL 64 | ||
88 | 90 | ||
89 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 91 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
90 | 92 | ||
diff --git a/arch/cris/include/asm/termbits.h b/arch/cris/include/asm/termbits.h index 66e1a7492a0c..1c43bc874ccf 100644 --- a/arch/cris/include/asm/termbits.h +++ b/arch/cris/include/asm/termbits.h | |||
@@ -214,6 +214,7 @@ struct ktermios { | |||
214 | #define FLUSHO 0010000 | 214 | #define FLUSHO 0010000 |
215 | #define PENDIN 0040000 | 215 | #define PENDIN 0040000 |
216 | #define IEXTEN 0100000 | 216 | #define IEXTEN 0100000 |
217 | #define EXTPROC 0200000 | ||
217 | 218 | ||
218 | /* tcflow() and TCXONC use these */ | 219 | /* tcflow() and TCXONC use these */ |
219 | #define TCOOFF 0 | 220 | #define TCOOFF 0 |
diff --git a/arch/frv/include/asm/ioctls.h b/arch/frv/include/asm/ioctls.h index d0c30e31fbda..a993e3759ccf 100644 --- a/arch/frv/include/asm/ioctls.h +++ b/arch/frv/include/asm/ioctls.h | |||
@@ -53,6 +53,7 @@ | |||
53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | 53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) |
54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
56 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
56 | 57 | ||
57 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | 58 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ |
58 | #define FIOCLEX 0x5451 | 59 | #define FIOCLEX 0x5451 |
@@ -79,6 +80,7 @@ | |||
79 | #define TIOCPKT_START 8 | 80 | #define TIOCPKT_START 8 |
80 | #define TIOCPKT_NOSTOP 16 | 81 | #define TIOCPKT_NOSTOP 16 |
81 | #define TIOCPKT_DOSTOP 32 | 82 | #define TIOCPKT_DOSTOP 32 |
83 | #define TIOCPKT_IOCTL 64 | ||
82 | 84 | ||
83 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 85 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
84 | 86 | ||
diff --git a/arch/frv/include/asm/termbits.h b/arch/frv/include/asm/termbits.h index 5568492b5086..7722e19cc349 100644 --- a/arch/frv/include/asm/termbits.h +++ b/arch/frv/include/asm/termbits.h | |||
@@ -180,6 +180,7 @@ struct ktermios { | |||
180 | #define FLUSHO 0010000 | 180 | #define FLUSHO 0010000 |
181 | #define PENDIN 0040000 | 181 | #define PENDIN 0040000 |
182 | #define IEXTEN 0100000 | 182 | #define IEXTEN 0100000 |
183 | #define EXTPROC 0200000 | ||
183 | 184 | ||
184 | 185 | ||
185 | /* tcflow() and TCXONC use these */ | 186 | /* tcflow() and TCXONC use these */ |
diff --git a/arch/h8300/include/asm/ioctls.h b/arch/h8300/include/asm/ioctls.h index 98a53d067269..b6b249f9f308 100644 --- a/arch/h8300/include/asm/ioctls.h +++ b/arch/h8300/include/asm/ioctls.h | |||
@@ -53,6 +53,7 @@ | |||
53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | 53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) |
54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
56 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
56 | 57 | ||
57 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | 58 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ |
58 | #define FIOCLEX 0x5451 | 59 | #define FIOCLEX 0x5451 |
@@ -79,6 +80,7 @@ | |||
79 | #define TIOCPKT_START 8 | 80 | #define TIOCPKT_START 8 |
80 | #define TIOCPKT_NOSTOP 16 | 81 | #define TIOCPKT_NOSTOP 16 |
81 | #define TIOCPKT_DOSTOP 32 | 82 | #define TIOCPKT_DOSTOP 32 |
83 | #define TIOCPKT_IOCTL 64 | ||
82 | 84 | ||
83 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 85 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
84 | 86 | ||
diff --git a/arch/h8300/include/asm/termbits.h b/arch/h8300/include/asm/termbits.h index 31eca81db3f7..3287a6244d74 100644 --- a/arch/h8300/include/asm/termbits.h +++ b/arch/h8300/include/asm/termbits.h | |||
@@ -179,6 +179,7 @@ struct ktermios { | |||
179 | #define FLUSHO 0010000 | 179 | #define FLUSHO 0010000 |
180 | #define PENDIN 0040000 | 180 | #define PENDIN 0040000 |
181 | #define IEXTEN 0100000 | 181 | #define IEXTEN 0100000 |
182 | #define EXTPROC 0200000 | ||
182 | 183 | ||
183 | 184 | ||
184 | /* tcflow() and TCXONC use these */ | 185 | /* tcflow() and TCXONC use these */ |
diff --git a/arch/ia64/include/asm/ioctls.h b/arch/ia64/include/asm/ioctls.h index f0ee86c0b5f7..b79c385114ef 100644 --- a/arch/ia64/include/asm/ioctls.h +++ b/arch/ia64/include/asm/ioctls.h | |||
@@ -59,6 +59,7 @@ | |||
59 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | 59 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) |
60 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 60 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
61 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 61 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
62 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
62 | 63 | ||
63 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | 64 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ |
64 | #define FIOCLEX 0x5451 | 65 | #define FIOCLEX 0x5451 |
@@ -85,6 +86,7 @@ | |||
85 | #define TIOCPKT_START 8 | 86 | #define TIOCPKT_START 8 |
86 | #define TIOCPKT_NOSTOP 16 | 87 | #define TIOCPKT_NOSTOP 16 |
87 | #define TIOCPKT_DOSTOP 32 | 88 | #define TIOCPKT_DOSTOP 32 |
89 | #define TIOCPKT_IOCTL 64 | ||
88 | 90 | ||
89 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 91 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
90 | 92 | ||
diff --git a/arch/ia64/include/asm/termbits.h b/arch/ia64/include/asm/termbits.h index 9f162e0089ad..c009b94e58d9 100644 --- a/arch/ia64/include/asm/termbits.h +++ b/arch/ia64/include/asm/termbits.h | |||
@@ -187,6 +187,7 @@ struct ktermios { | |||
187 | #define FLUSHO 0010000 | 187 | #define FLUSHO 0010000 |
188 | #define PENDIN 0040000 | 188 | #define PENDIN 0040000 |
189 | #define IEXTEN 0100000 | 189 | #define IEXTEN 0100000 |
190 | #define EXTPROC 0200000 | ||
190 | 191 | ||
191 | /* tcflow() and TCXONC use these */ | 192 | /* tcflow() and TCXONC use these */ |
192 | #define TCOOFF 0 | 193 | #define TCOOFF 0 |
diff --git a/arch/m32r/include/asm/ioctls.h b/arch/m32r/include/asm/ioctls.h index f4c13a52fe48..66288063a4c0 100644 --- a/arch/m32r/include/asm/ioctls.h +++ b/arch/m32r/include/asm/ioctls.h | |||
@@ -53,6 +53,7 @@ | |||
53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | 53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) |
54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
56 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
56 | 57 | ||
57 | #define FIONCLEX 0x5450 | 58 | #define FIONCLEX 0x5450 |
58 | #define FIOCLEX 0x5451 | 59 | #define FIOCLEX 0x5451 |
@@ -79,6 +80,7 @@ | |||
79 | #define TIOCPKT_START 8 | 80 | #define TIOCPKT_START 8 |
80 | #define TIOCPKT_NOSTOP 16 | 81 | #define TIOCPKT_NOSTOP 16 |
81 | #define TIOCPKT_DOSTOP 32 | 82 | #define TIOCPKT_DOSTOP 32 |
83 | #define TIOCPKT_IOCTL 64 | ||
82 | 84 | ||
83 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 85 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
84 | 86 | ||
diff --git a/arch/m32r/include/asm/termbits.h b/arch/m32r/include/asm/termbits.h index bc104008b55b..957a3c688549 100644 --- a/arch/m32r/include/asm/termbits.h +++ b/arch/m32r/include/asm/termbits.h | |||
@@ -179,6 +179,7 @@ struct ktermios { | |||
179 | #define FLUSHO 0010000 | 179 | #define FLUSHO 0010000 |
180 | #define PENDIN 0040000 | 180 | #define PENDIN 0040000 |
181 | #define IEXTEN 0100000 | 181 | #define IEXTEN 0100000 |
182 | #define EXTPROC 0200000 | ||
182 | 183 | ||
183 | /* tcflow() and TCXONC use these */ | 184 | /* tcflow() and TCXONC use these */ |
184 | #define TCOOFF 0 | 185 | #define TCOOFF 0 |
diff --git a/arch/m68k/include/asm/ioctls.h b/arch/m68k/include/asm/ioctls.h index b8d2f4be7fd7..91a57d665460 100644 --- a/arch/m68k/include/asm/ioctls.h +++ b/arch/m68k/include/asm/ioctls.h | |||
@@ -52,6 +52,7 @@ | |||
52 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | 52 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) |
53 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 53 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
54 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 54 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
55 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
55 | 56 | ||
56 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | 57 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ |
57 | #define FIOCLEX 0x5451 | 58 | #define FIOCLEX 0x5451 |
@@ -78,6 +79,7 @@ | |||
78 | #define TIOCPKT_START 8 | 79 | #define TIOCPKT_START 8 |
79 | #define TIOCPKT_NOSTOP 16 | 80 | #define TIOCPKT_NOSTOP 16 |
80 | #define TIOCPKT_DOSTOP 32 | 81 | #define TIOCPKT_DOSTOP 32 |
82 | #define TIOCPKT_IOCTL 64 | ||
81 | 83 | ||
82 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 84 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
83 | 85 | ||
diff --git a/arch/m68k/include/asm/termbits.h b/arch/m68k/include/asm/termbits.h index 8c14170996bb..aea1e37b765a 100644 --- a/arch/m68k/include/asm/termbits.h +++ b/arch/m68k/include/asm/termbits.h | |||
@@ -179,6 +179,7 @@ struct ktermios { | |||
179 | #define FLUSHO 0010000 | 179 | #define FLUSHO 0010000 |
180 | #define PENDIN 0040000 | 180 | #define PENDIN 0040000 |
181 | #define IEXTEN 0100000 | 181 | #define IEXTEN 0100000 |
182 | #define EXTPROC 0200000 | ||
182 | 183 | ||
183 | 184 | ||
184 | /* tcflow() and TCXONC use these */ | 185 | /* tcflow() and TCXONC use these */ |
diff --git a/arch/mips/include/asm/ioctls.h b/arch/mips/include/asm/ioctls.h index 2fb9e1693bf7..d87cb0465693 100644 --- a/arch/mips/include/asm/ioctls.h +++ b/arch/mips/include/asm/ioctls.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #define TIOCPKT_START 0x08 /* start output */ | 41 | #define TIOCPKT_START 0x08 /* start output */ |
42 | #define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ | 42 | #define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ |
43 | #define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ | 43 | #define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ |
44 | /* #define TIOCPKT_IOCTL 0x40 state change of pty driver */ | 44 | #define TIOCPKT_IOCTL 0x40 /* state change of pty driver */ |
45 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ | 45 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ |
46 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ | 46 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ |
47 | #define TIOCNOTTY 0x5471 /* void tty association */ | 47 | #define TIOCNOTTY 0x5471 /* void tty association */ |
@@ -83,6 +83,7 @@ | |||
83 | #define TCSETSF2 _IOW('T', 0x2D, struct termios2) | 83 | #define TCSETSF2 _IOW('T', 0x2D, struct termios2) |
84 | #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 84 | #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
85 | #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ | 85 | #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ |
86 | #define TIOCSIG _IOW('T', 0x36, int) /* Generate signal on Pty slave */ | ||
86 | 87 | ||
87 | /* I hope the range from 0x5480 on is free ... */ | 88 | /* I hope the range from 0x5480 on is free ... */ |
88 | #define TIOCSCTTY 0x5480 /* become controlling tty */ | 89 | #define TIOCSCTTY 0x5480 /* become controlling tty */ |
diff --git a/arch/mips/include/asm/termbits.h b/arch/mips/include/asm/termbits.h index c83c68444e86..76630b396fac 100644 --- a/arch/mips/include/asm/termbits.h +++ b/arch/mips/include/asm/termbits.h | |||
@@ -203,6 +203,7 @@ struct ktermios { | |||
203 | #define PENDIN 0040000 /* Retype pending input (state). */ | 203 | #define PENDIN 0040000 /* Retype pending input (state). */ |
204 | #define TOSTOP 0100000 /* Send SIGTTOU for background output. */ | 204 | #define TOSTOP 0100000 /* Send SIGTTOU for background output. */ |
205 | #define ITOSTOP TOSTOP | 205 | #define ITOSTOP TOSTOP |
206 | #define EXTPROC 0200000 /* External processing on pty */ | ||
206 | 207 | ||
207 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 208 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
208 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 209 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
diff --git a/arch/mn10300/include/asm/ioctls.h b/arch/mn10300/include/asm/ioctls.h index 638219a99b1e..cb8cf1902234 100644 --- a/arch/mn10300/include/asm/ioctls.h +++ b/arch/mn10300/include/asm/ioctls.h | |||
@@ -54,6 +54,7 @@ | |||
54 | #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number | 54 | #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number |
55 | * (of pty-mux device) */ | 55 | * (of pty-mux device) */ |
56 | #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ | 56 | #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ |
57 | #define TIOCSIG _IOW('T', 0x36, int) /* Generate signal on Pty slave */ | ||
57 | 58 | ||
58 | #define FIONCLEX 0x5450 | 59 | #define FIONCLEX 0x5450 |
59 | #define FIOCLEX 0x5451 | 60 | #define FIOCLEX 0x5451 |
@@ -80,6 +81,7 @@ | |||
80 | #define TIOCPKT_START 8 | 81 | #define TIOCPKT_START 8 |
81 | #define TIOCPKT_NOSTOP 16 | 82 | #define TIOCPKT_NOSTOP 16 |
82 | #define TIOCPKT_DOSTOP 32 | 83 | #define TIOCPKT_DOSTOP 32 |
84 | #define TIOCPKT_IOCTL 64 | ||
83 | 85 | ||
84 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 86 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
85 | 87 | ||
diff --git a/arch/mn10300/include/asm/termbits.h b/arch/mn10300/include/asm/termbits.h index eb2b0dc1f696..130d42495972 100644 --- a/arch/mn10300/include/asm/termbits.h +++ b/arch/mn10300/include/asm/termbits.h | |||
@@ -180,6 +180,7 @@ struct ktermios { | |||
180 | #define FLUSHO 0010000 | 180 | #define FLUSHO 0010000 |
181 | #define PENDIN 0040000 | 181 | #define PENDIN 0040000 |
182 | #define IEXTEN 0100000 | 182 | #define IEXTEN 0100000 |
183 | #define EXTPROC 0200000 | ||
183 | 184 | ||
184 | /* tcflow() and TCXONC use these */ | 185 | /* tcflow() and TCXONC use these */ |
185 | #define TCOOFF 0 | 186 | #define TCOOFF 0 |
diff --git a/arch/parisc/include/asm/ioctls.h b/arch/parisc/include/asm/ioctls.h index 6cc497e52532..4e0614456bea 100644 --- a/arch/parisc/include/asm/ioctls.h +++ b/arch/parisc/include/asm/ioctls.h | |||
@@ -52,6 +52,7 @@ | |||
52 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | 52 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) |
53 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 53 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
54 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 54 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
55 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
55 | 56 | ||
56 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | 57 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ |
57 | #define FIOCLEX 0x5451 | 58 | #define FIOCLEX 0x5451 |
@@ -82,6 +83,7 @@ | |||
82 | #define TIOCPKT_START 8 | 83 | #define TIOCPKT_START 8 |
83 | #define TIOCPKT_NOSTOP 16 | 84 | #define TIOCPKT_NOSTOP 16 |
84 | #define TIOCPKT_DOSTOP 32 | 85 | #define TIOCPKT_DOSTOP 32 |
86 | #define TIOCPKT_IOCTL 64 | ||
85 | 87 | ||
86 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 88 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
87 | 89 | ||
diff --git a/arch/parisc/include/asm/termbits.h b/arch/parisc/include/asm/termbits.h index d8bbc73b16b7..d1ab92177a5c 100644 --- a/arch/parisc/include/asm/termbits.h +++ b/arch/parisc/include/asm/termbits.h | |||
@@ -180,6 +180,7 @@ struct ktermios { | |||
180 | #define FLUSHO 0010000 | 180 | #define FLUSHO 0010000 |
181 | #define PENDIN 0040000 | 181 | #define PENDIN 0040000 |
182 | #define IEXTEN 0100000 | 182 | #define IEXTEN 0100000 |
183 | #define EXTPROC 0200000 | ||
183 | 184 | ||
184 | /* tcflow() and TCXONC use these */ | 185 | /* tcflow() and TCXONC use these */ |
185 | #define TCOOFF 0 | 186 | #define TCOOFF 0 |
diff --git a/arch/powerpc/include/asm/ioctls.h b/arch/powerpc/include/asm/ioctls.h index 1842186d872c..851920052e08 100644 --- a/arch/powerpc/include/asm/ioctls.h +++ b/arch/powerpc/include/asm/ioctls.h | |||
@@ -80,6 +80,7 @@ | |||
80 | # define TIOCPKT_START 8 | 80 | # define TIOCPKT_START 8 |
81 | # define TIOCPKT_NOSTOP 16 | 81 | # define TIOCPKT_NOSTOP 16 |
82 | # define TIOCPKT_DOSTOP 32 | 82 | # define TIOCPKT_DOSTOP 32 |
83 | # define TIOCPKT_IOCTL 64 | ||
83 | 84 | ||
84 | 85 | ||
85 | #define TIOCNOTTY 0x5422 | 86 | #define TIOCNOTTY 0x5422 |
@@ -93,6 +94,7 @@ | |||
93 | #define TIOCSRS485 0x542f | 94 | #define TIOCSRS485 0x542f |
94 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 95 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
95 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 96 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
97 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
96 | 98 | ||
97 | #define TIOCSERCONFIG 0x5453 | 99 | #define TIOCSERCONFIG 0x5453 |
98 | #define TIOCSERGWILD 0x5454 | 100 | #define TIOCSERGWILD 0x5454 |
diff --git a/arch/powerpc/include/asm/termbits.h b/arch/powerpc/include/asm/termbits.h index 6698188ca550..549d700e18f2 100644 --- a/arch/powerpc/include/asm/termbits.h +++ b/arch/powerpc/include/asm/termbits.h | |||
@@ -189,6 +189,7 @@ struct ktermios { | |||
189 | #define FLUSHO 0x00800000 | 189 | #define FLUSHO 0x00800000 |
190 | #define PENDIN 0x20000000 | 190 | #define PENDIN 0x20000000 |
191 | #define IEXTEN 0x00000400 | 191 | #define IEXTEN 0x00000400 |
192 | #define EXTPROC 0x10000000 | ||
192 | 193 | ||
193 | /* Values for the ACTION argument to `tcflow'. */ | 194 | /* Values for the ACTION argument to `tcflow'. */ |
194 | #define TCOOFF 0 | 195 | #define TCOOFF 0 |
diff --git a/arch/s390/include/asm/ioctls.h b/arch/s390/include/asm/ioctls.h index 40e481b1b461..2f3d8736361f 100644 --- a/arch/s390/include/asm/ioctls.h +++ b/arch/s390/include/asm/ioctls.h | |||
@@ -60,6 +60,7 @@ | |||
60 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | 60 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) |
61 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 61 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
62 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 62 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
63 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
63 | 64 | ||
64 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | 65 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ |
65 | #define FIOCLEX 0x5451 | 66 | #define FIOCLEX 0x5451 |
@@ -86,6 +87,7 @@ | |||
86 | #define TIOCPKT_START 8 | 87 | #define TIOCPKT_START 8 |
87 | #define TIOCPKT_NOSTOP 16 | 88 | #define TIOCPKT_NOSTOP 16 |
88 | #define TIOCPKT_DOSTOP 32 | 89 | #define TIOCPKT_DOSTOP 32 |
90 | #define TIOCPKT_IOCTL 64 | ||
89 | 91 | ||
90 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 92 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
91 | 93 | ||
diff --git a/arch/sh/include/asm/ioctls.h b/arch/sh/include/asm/ioctls.h index c212c371a4a5..eb6c4c687972 100644 --- a/arch/sh/include/asm/ioctls.h +++ b/arch/sh/include/asm/ioctls.h | |||
@@ -69,6 +69,7 @@ | |||
69 | # define TIOCPKT_START 8 | 69 | # define TIOCPKT_START 8 |
70 | # define TIOCPKT_NOSTOP 16 | 70 | # define TIOCPKT_NOSTOP 16 |
71 | # define TIOCPKT_DOSTOP 32 | 71 | # define TIOCPKT_DOSTOP 32 |
72 | # define TIOCPKT_IOCTL 64 | ||
72 | 73 | ||
73 | 74 | ||
74 | #define TIOCNOTTY _IO('T', 34) /* 0x5422 */ | 75 | #define TIOCNOTTY _IO('T', 34) /* 0x5422 */ |
@@ -84,6 +85,7 @@ | |||
84 | #define TCSETSF2 _IOW('T', 45, struct termios2) | 85 | #define TCSETSF2 _IOW('T', 45, struct termios2) |
85 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 86 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
86 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 87 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
88 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
87 | 89 | ||
88 | #define TIOCSERCONFIG _IO('T', 83) /* 0x5453 */ | 90 | #define TIOCSERCONFIG _IO('T', 83) /* 0x5453 */ |
89 | #define TIOCSERGWILD _IOR('T', 84, int) /* 0x5454 */ | 91 | #define TIOCSERGWILD _IOR('T', 84, int) /* 0x5454 */ |
diff --git a/arch/sparc/include/asm/ioctls.h b/arch/sparc/include/asm/ioctls.h index 1fe6855c5c18..53f4ee009bdd 100644 --- a/arch/sparc/include/asm/ioctls.h +++ b/arch/sparc/include/asm/ioctls.h | |||
@@ -80,6 +80,7 @@ | |||
80 | /* Get minor device of a pty master's FD -- Solaris equiv is ISPTM */ | 80 | /* Get minor device of a pty master's FD -- Solaris equiv is ISPTM */ |
81 | #define TIOCGPTN _IOR('t', 134, unsigned int) /* Get Pty Number */ | 81 | #define TIOCGPTN _IOR('t', 134, unsigned int) /* Get Pty Number */ |
82 | #define TIOCSPTLCK _IOW('t', 135, int) /* Lock/unlock PTY */ | 82 | #define TIOCSPTLCK _IOW('t', 135, int) /* Lock/unlock PTY */ |
83 | #define TIOCSIG _IOW('t', 136, int) /* Generate signal on Pty slave */ | ||
83 | 84 | ||
84 | /* Little f */ | 85 | /* Little f */ |
85 | #define FIOCLEX _IO('f', 1) | 86 | #define FIOCLEX _IO('f', 1) |
@@ -132,5 +133,6 @@ | |||
132 | #define TIOCPKT_START 8 | 133 | #define TIOCPKT_START 8 |
133 | #define TIOCPKT_NOSTOP 16 | 134 | #define TIOCPKT_NOSTOP 16 |
134 | #define TIOCPKT_DOSTOP 32 | 135 | #define TIOCPKT_DOSTOP 32 |
136 | #define TIOCPKT_IOCTL 64 | ||
135 | 137 | ||
136 | #endif /* !(_ASM_SPARC_IOCTLS_H) */ | 138 | #endif /* !(_ASM_SPARC_IOCTLS_H) */ |
diff --git a/arch/sparc/include/asm/termbits.h b/arch/sparc/include/asm/termbits.h index d72dfed1f9d7..23b10ff08df2 100644 --- a/arch/sparc/include/asm/termbits.h +++ b/arch/sparc/include/asm/termbits.h | |||
@@ -225,6 +225,7 @@ struct ktermios { | |||
225 | #define FLUSHO 0x00002000 | 225 | #define FLUSHO 0x00002000 |
226 | #define PENDIN 0x00004000 | 226 | #define PENDIN 0x00004000 |
227 | #define IEXTEN 0x00008000 | 227 | #define IEXTEN 0x00008000 |
228 | #define EXTPROC 0x00010000 | ||
228 | 229 | ||
229 | /* modem lines */ | 230 | /* modem lines */ |
230 | #define TIOCM_LE 0x001 | 231 | #define TIOCM_LE 0x001 |
diff --git a/arch/xtensa/include/asm/ioctls.h b/arch/xtensa/include/asm/ioctls.h index 0ffa942954b9..ab1800012ed9 100644 --- a/arch/xtensa/include/asm/ioctls.h +++ b/arch/xtensa/include/asm/ioctls.h | |||
@@ -81,6 +81,7 @@ | |||
81 | # define TIOCPKT_START 8 | 81 | # define TIOCPKT_START 8 |
82 | # define TIOCPKT_NOSTOP 16 | 82 | # define TIOCPKT_NOSTOP 16 |
83 | # define TIOCPKT_DOSTOP 32 | 83 | # define TIOCPKT_DOSTOP 32 |
84 | # define TIOCPKT_IOCTL 64 | ||
84 | 85 | ||
85 | 86 | ||
86 | #define TIOCNOTTY _IO('T', 34) | 87 | #define TIOCNOTTY _IO('T', 34) |
@@ -97,6 +98,7 @@ | |||
97 | #define TCSETSF2 _IOW('T', 45, struct termios2) | 98 | #define TCSETSF2 _IOW('T', 45, struct termios2) |
98 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 99 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
99 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 100 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
101 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | ||
100 | 102 | ||
101 | #define TIOCSERCONFIG _IO('T', 83) | 103 | #define TIOCSERCONFIG _IO('T', 83) |
102 | #define TIOCSERGWILD _IOR('T', 84, int) | 104 | #define TIOCSERGWILD _IOR('T', 84, int) |
diff --git a/arch/xtensa/include/asm/termbits.h b/arch/xtensa/include/asm/termbits.h index 85aa6a3c0b6e..0d6c8715b24f 100644 --- a/arch/xtensa/include/asm/termbits.h +++ b/arch/xtensa/include/asm/termbits.h | |||
@@ -196,6 +196,7 @@ struct ktermios { | |||
196 | #define FLUSHO 0010000 | 196 | #define FLUSHO 0010000 |
197 | #define PENDIN 0040000 | 197 | #define PENDIN 0040000 |
198 | #define IEXTEN 0100000 | 198 | #define IEXTEN 0100000 |
199 | #define EXTPROC 0200000 | ||
199 | 200 | ||
200 | /* tcflow() and TCXONC use these */ | 201 | /* tcflow() and TCXONC use these */ |
201 | 202 | ||