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=^O werase=^W lnext=^V 13 eol2=\0 14 */ 15 #define INIT_C_CC { \ 16 [VINTR] = 'C'-0x40, \ 17 [VQUIT] = '\\'-0x40, \ 18 [VERASE] = '\177', \ 19 [VKILL] = 'U'-0x40, \ 20 [VEOF] = 'D'-0x40, \ 21 [VSTART] = 'Q'-0x40, \ 22 [VSTOP] = 'S'-0x40, \ 23 [VSUSP] = 'Z'-0x40, \ 24 [VREPRINT] = 'R'-0x40, \ 25 [VDISCARD] = 'O'-0x40, \ 26 [VWERASE] = 'W'-0x40, \ 27 [VLNEXT] = 'V'-0x40, \ 28 [VMIN] = 1 } 29 #endif 30 31 int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); 32 int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); 33 #ifdef TCGETS2 34 int user_termios_to_kernel_termios(struct ktermios *, struct termios2 __user *); 35 int kernel_termios_to_user_termios(struct termios2 __user *, struct ktermios *); 36 int user_termios_to_kernel_termios_1(struct ktermios *, struct termios __user *); 37 int kernel_termios_to_user_termios_1(struct termios __user *, struct ktermios *); 38 #else /* TCGETS2 */ 39 int user_termios_to_kernel_termios(struct ktermios *, struct termios __user *); 40 int kernel_termios_to_user_termios(struct termios __user *, struct ktermios *); 41 #endif /* TCGETS2 */ 42 43 #endif /* _LINUX_TERMIOS_CONV_H */ 44