From: Alan Cox Add the termios2 structure ready for enabling on most platforms. One or two like Sparc are plain weird so have been left alone. Most can use the same structure as ktermios for termios2 (ie the newer ioctl uses the structure matching the current kernel structure) Signed-off-by: Alan Cox Cc: Bryan Wu Cc: Ian Molton Cc: Haavard Skinnemoen Cc: Yoshinori Sato Cc: Mikael Starvik Cc: David Howells Cc: "Luck, Tony" Cc: Hirokazu Takata Cc: Geert Uytterhoeven Cc: Roman Zippel Cc: Ralf Baechle Cc: Kyle McMartin Cc: Matthew Wilcox Cc: Heiko Carstens Cc: Martin Schwidefsky Cc: Paul Mundt Cc: Kazumoto Kojima Cc: Richard Curnow Cc: Miles Bader Cc: Chris Zankel Signed-off-by: Andrew Morton --- include/asm-arm26/termbits.h | 12 +++++++++++- include/asm-avr32/termbits.h | 11 +++++++++++ include/asm-blackfin/termbits.h | 11 +++++++++++ include/asm-cris/termbits.h | 11 +++++++++++ include/asm-frv/termbits.h | 11 +++++++++++ include/asm-h8300/termbits.h | 11 +++++++++++ include/asm-ia64/termbits.h | 11 +++++++++++ include/asm-m32r/termbits.h | 11 +++++++++++ include/asm-m68k/termbits.h | 11 +++++++++++ include/asm-mips/termbits.h | 11 +++++++++++ include/asm-parisc/termbits.h | 11 +++++++++++ include/asm-s390/termbits.h | 11 +++++++++++ include/asm-sh/termbits.h | 11 +++++++++++ include/asm-v850/termbits.h | 11 +++++++++++ include/asm-xtensa/termbits.h | 11 +++++++++++ 15 files changed, 165 insertions(+), 1 deletion(-) diff -puN include/asm-arm/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-arm/termbits.h diff -puN include/asm-arm26/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-arm26/termbits.h --- a/include/asm-arm26/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-arm26/termbits.h @@ -15,7 +15,7 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; -struct ktermios { +struct termios2 { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ tcflag_t c_cflag; /* control mode flags */ @@ -26,6 +26,16 @@ struct ktermios { speed_t c_ospeed; /* output speed */ }; +struct ktermios { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; /* c_cc characters */ #define VINTR 0 diff -puN include/asm-avr32/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-avr32/termbits.h --- a/include/asm-avr32/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-avr32/termbits.h @@ -17,6 +17,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ diff -puN include/asm-blackfin/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-blackfin/termbits.h --- a/include/asm-blackfin/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-blackfin/termbits.h @@ -17,6 +17,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ diff -puN include/asm-cris/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-cris/termbits.h --- a/include/asm-cris/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-cris/termbits.h @@ -19,6 +19,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ diff -puN include/asm-frv/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-frv/termbits.h --- a/include/asm-frv/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-frv/termbits.h @@ -17,6 +17,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ diff -puN include/asm-h8300/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-h8300/termbits.h --- a/include/asm-h8300/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-h8300/termbits.h @@ -17,6 +17,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ diff -puN include/asm-ia64/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-ia64/termbits.h --- a/include/asm-ia64/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-ia64/termbits.h @@ -26,6 +26,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ diff -puN include/asm-m32r/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-m32r/termbits.h --- a/include/asm-m32r/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-m32r/termbits.h @@ -17,6 +17,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ diff -puN include/asm-m68k/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-m68k/termbits.h --- a/include/asm-m68k/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-m68k/termbits.h @@ -17,6 +17,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ diff -puN include/asm-mips/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-mips/termbits.h --- a/include/asm-mips/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-mips/termbits.h @@ -30,6 +30,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ diff -puN include/asm-parisc/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-parisc/termbits.h --- a/include/asm-parisc/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-parisc/termbits.h @@ -17,6 +17,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ diff -puN include/asm-s390/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-s390/termbits.h --- a/include/asm-s390/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-s390/termbits.h @@ -25,6 +25,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ diff -puN include/asm-sh/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-sh/termbits.h --- a/include/asm-sh/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-sh/termbits.h @@ -17,6 +17,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ diff -puN include/asm-v850/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-v850/termbits.h --- a/include/asm-v850/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-v850/termbits.h @@ -17,6 +17,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ diff -puN include/asm-xtensa/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support include/asm-xtensa/termbits.h --- a/include/asm-xtensa/termbits.h~lots-of-architectures-enable-arbitary-speed-tty-support +++ a/include/asm-xtensa/termbits.h @@ -30,6 +30,17 @@ struct termios { cc_t c_cc[NCCS]; /* control characters */ }; +struct termios2 { + tcflag_t c_iflag; /* input mode flags */ + tcflag_t c_oflag; /* output mode flags */ + tcflag_t c_cflag; /* control mode flags */ + tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline */ + cc_t c_cc[NCCS]; /* control characters */ + speed_t c_ispeed; /* input speed */ + speed_t c_ospeed; /* output speed */ +}; + struct ktermios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ _