Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

termios: start unifying non-UAPI parts of asm/termios.h

* new header (linut/termios_internal.h), pulled by the users of those
suckers
* defaults for INIT_C_CC and externs for conversion helpers moved over
there
* remove termios-base.h (empty now)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Link: https://lore.kernel.org/r/YxDmptU7dNGZ+/Hn@ZenIV
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Al Viro and committed by
Greg Kroah-Hartman
c9874d3f 1d5d6682

+39 -117
+1 -7
arch/alpha/include/asm/termios.h
··· 2 2 #ifndef _ALPHA_TERMIOS_H 3 3 #define _ALPHA_TERMIOS_H 4 4 5 + #include <linux/uaccess.h> 5 6 #include <uapi/asm/termios.h> 6 7 7 8 /* eof=^D eol=\0 eol2=\0 erase=del ··· 12 11 vmin=\1 vtime=\0 13 12 */ 14 13 #define INIT_C_CC "\004\000\000\177\027\025\022\000\003\034\032\000\021\023\026\025\001\000" 15 - 16 - int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); 17 - int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); 18 - int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); 19 - int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); 20 - int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); 21 - int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); 22 14 23 15 #endif /* _ALPHA_TERMIOS_H */
+1 -2
arch/alpha/kernel/termios.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 - #include <linux/uaccess.h> 3 - #include <linux/termios.h> 2 + #include <linux/termios_internal.h> 4 3 5 4 int user_termio_to_kernel_termios(struct ktermios *termios, 6 5 struct termio __user *termio)
-16
arch/ia64/include/asm/termios.h
··· 10 10 11 11 #include <uapi/asm/termios.h> 12 12 13 - 14 - /* intr=^C quit=^\ erase=del kill=^U 15 - eof=^D vtime=\0 vmin=\1 sxtc=\0 16 - start=^Q stop=^S susp=^Z eol=\0 17 - reprint=^R discard=^U werase=^W lnext=^V 18 - eol2=\0 19 - */ 20 - #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" 21 - 22 - int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); 23 - int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); 24 - int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); 25 - int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); 26 - int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); 27 - int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); 28 - 29 13 #endif /* _ASM_IA64_TERMIOS_H */
-9
arch/mips/include/asm/termios.h
··· 21 21 */ 22 22 #define INIT_C_CC "\003\034\177\025\1\0\0\0\021\023\032\0\022\017\027\026\004\0" 23 23 24 - #include <linux/string.h> 25 - 26 - int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); 27 - int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); 28 - int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); 29 - int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); 30 - int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); 31 - int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); 32 - 33 24 #endif /* _ASM_TERMIOS_H */
-16
arch/parisc/include/asm/termios.h
··· 4 4 5 5 #include <uapi/asm/termios.h> 6 6 7 - 8 - /* intr=^C quit=^\ erase=del kill=^U 9 - eof=^D vtime=\0 vmin=\1 sxtc=\0 10 - start=^Q stop=^S susp=^Z eol=\0 11 - reprint=^R discard=^U werase=^W lnext=^V 12 - eol2=\0 13 - */ 14 - #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" 15 - 16 - int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); 17 - int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); 18 - int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); 19 - int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); 20 - int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); 21 - int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); 22 - 23 7 #endif /* _PARISC_TERMIOS_H */
-2
arch/powerpc/include/asm/termios.h
··· 13 13 /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ 14 14 #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" 15 15 16 - #include <asm-generic/termios-base.h> 17 - 18 16 #endif /* _ASM_POWERPC_TERMIOS_H */
-14
arch/s390/include/asm/termios.h
··· 9 9 10 10 #include <uapi/asm/termios.h> 11 11 12 - 13 - /* intr=^C quit=^\ erase=del kill=^U 14 - eof=^D vtime=\0 vmin=\1 sxtc=\0 15 - start=^Q stop=^S susp=^Z eol=\0 16 - reprint=^R discard=^U werase=^W lnext=^V 17 - eol2=\0 18 - */ 19 - #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" 20 - 21 - #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) 22 - #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) 23 - 24 - #include <asm-generic/termios-base.h> 25 - 26 12 #endif /* _S390_TERMIOS_H */
+1 -7
arch/sparc/include/asm/termios.h
··· 3 3 #define _SPARC_TERMIOS_H 4 4 5 5 #include <uapi/asm/termios.h> 6 + #include <linux/uaccess.h> 6 7 7 8 8 9 /* intr=^C quit=^\ erase=del kill=^U ··· 13 12 vmin=\1 vtime=\0 14 13 */ 15 14 #define INIT_C_CC "\003\034\177\025\004\000\000\000\021\023\032\031\022\025\027\026\001" 16 - 17 - int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); 18 - int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); 19 - int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); 20 - int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); 21 - int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); 22 - int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); 23 15 24 16 #endif /* _SPARC_TERMIOS_H */
+2 -2
arch/sparc/kernel/termios.c
··· 1 - #include <linux/uaccess.h> 2 - #include <linux/termios.h> 1 + // SPDX-License-Identifier: GPL-2.0 2 + #include <linux/termios_internal.h> 3 3 4 4 /* 5 5 * c_cc characters in the termio structure. Oh, how I love being
+1
drivers/tty/hvc/hvcs.c
··· 69 69 #include <asm/hvconsole.h> 70 70 #include <asm/hvcserver.h> 71 71 #include <linux/uaccess.h> 72 + #include <linux/termios_internal.h> 72 73 #include <asm/vio.h> 73 74 74 75 /*
+1 -1
drivers/tty/tty_io.c
··· 99 99 #include <linux/serial.h> 100 100 #include <linux/ratelimit.h> 101 101 #include <linux/compat.h> 102 - 103 102 #include <linux/uaccess.h> 103 + #include <linux/termios_internal.h> 104 104 105 105 #include <linux/kbd_kern.h> 106 106 #include <linux/vt_kern.h>
+1
drivers/tty/tty_ioctl.c
··· 21 21 #include <linux/bitops.h> 22 22 #include <linux/mutex.h> 23 23 #include <linux/compat.h> 24 + #include <linux/termios_internal.h> 24 25 #include "tty.h" 25 26 26 27 #include <asm/io.h>
+1
drivers/tty/vcc.c
··· 11 11 #include <linux/sysfs.h> 12 12 #include <linux/tty.h> 13 13 #include <linux/tty_flip.h> 14 + #include <linux/termios_internal.h> 14 15 #include <asm/vio.h> 15 16 #include <asm/ldc.h> 16 17
-21
include/asm-generic/termios-base.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - /* termios.h: generic termios/termio user copying/translation 3 - */ 4 - 5 - #ifndef _ASM_GENERIC_TERMIOS_BASE_H 6 - #define _ASM_GENERIC_TERMIOS_BASE_H 7 - 8 - #include <linux/uaccess.h> 9 - 10 - #ifndef __ARCH_TERMIO_GETPUT 11 - 12 - int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); 13 - int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); 14 - int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); 15 - int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); 16 - int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); 17 - int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); 18 - 19 - #endif /* __ARCH_TERMIO_GETPUT */ 20 - 21 - #endif /* _ASM_GENERIC_TERMIOS_BASE_H */
-20
include/asm-generic/termios.h
··· 6 6 #include <linux/uaccess.h> 7 7 #include <uapi/asm-generic/termios.h> 8 8 9 - /* intr=^C quit=^\ erase=del kill=^U 10 - eof=^D vtime=\0 vmin=\1 sxtc=\0 11 - start=^Q stop=^S susp=^Z eol=\0 12 - reprint=^R discard=^U werase=^W lnext=^V 13 - eol2=\0 14 - */ 15 - #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" 16 - 17 - int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); 18 - int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); 19 - #ifdef TCGETS2 20 - int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); 21 - int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); 22 - int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); 23 - int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); 24 - #else /* TCGETS2 */ 25 - int user_termios_to_kernel_termios(struct ktermios *, struct termios __user *); 26 - int kernel_termios_to_user_termios(struct termios __user *, struct ktermios *); 27 - #endif /* TCGETS2 */ 28 - 29 9 #endif /* _ASM_GENERIC_TERMIOS_H */
+30
include/linux/termios_internal.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef _LINUX_TERMIOS_CONV_H 3 + #define _LINUX_TERMIOS_CONV_H 4 + 5 + #include <linux/uaccess.h> 6 + #include <asm/termios.h> 7 + 8 + #ifndef INIT_C_CC 9 + /* intr=^C quit=^\ erase=del kill=^U 10 + eof=^D vtime=\0 vmin=\1 sxtc=\0 11 + start=^Q stop=^S susp=^Z eol=\0 12 + reprint=^R discard=^U werase=^W lnext=^V 13 + eol2=\0 14 + */ 15 + #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" 16 + #endif 17 + 18 + int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); 19 + int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); 20 + #ifdef TCGETS2 21 + int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); 22 + int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); 23 + int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); 24 + int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); 25 + #else /* TCGETS2 */ 26 + int user_termios_to_kernel_termios(struct ktermios *, struct termios __user *); 27 + int kernel_termios_to_user_termios(struct termios __user *, struct ktermios *); 28 + #endif /* TCGETS2 */ 29 + 30 + #endif /* _LINUX_TERMIOS_CONV_H */