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

termios: convert the last (sparc) INIT_C_CC to array

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

authored by

Al Viro and committed by
Greg Kroah-Hartman
e7b4c812 d04f9915

+8 -11
-9
arch/sparc/include/asm/termios.h
··· 5 5 #include <uapi/asm/termios.h> 6 6 #include <linux/uaccess.h> 7 7 8 - 9 - /* intr=^C quit=^\ erase=del kill=^U 10 - eof=^D eol=\0 eol2=\0 sxtc=\0 11 - start=^Q stop=^S susp=^Z dsusp=^Y 12 - reprint=^R discard=^O werase=^W lnext=^V 13 - vmin=\1 vtime=\0 14 - */ 15 - #define INIT_C_CC "\003\034\177\025\004\000\000\000\021\023\032\031\022\017\027\026\001" 16 - 17 8 #endif /* _SPARC_TERMIOS_H */
+8 -2
include/linux/termios_internal.h
··· 5 5 #include <linux/uaccess.h> 6 6 #include <asm/termios.h> 7 7 8 - #ifndef INIT_C_CC 9 8 /* intr=^C quit=^\ erase=del kill=^U 10 9 eof=^D vtime=\0 vmin=\1 sxtc=\0 11 10 start=^Q stop=^S susp=^Z eol=\0 12 11 reprint=^R discard=^O werase=^W lnext=^V 13 12 eol2=\0 14 13 */ 14 + 15 + #ifdef VDSUSP 16 + #define INIT_C_CC_VDSUSP_EXTRA [VDSUSP] = 'Y'-0x40, 17 + #else 18 + #define INIT_C_CC_VDSUSP_EXTRA 19 + #endif 20 + 15 21 #define INIT_C_CC { \ 16 22 [VINTR] = 'C'-0x40, \ 17 23 [VQUIT] = '\\'-0x40, \ ··· 31 25 [VDISCARD] = 'O'-0x40, \ 32 26 [VWERASE] = 'W'-0x40, \ 33 27 [VLNEXT] = 'V'-0x40, \ 28 + INIT_C_CC_VDSUSP_EXTRA \ 34 29 [VMIN] = 1 } 35 - #endif 36 30 37 31 int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); 38 32 int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *);