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>
This commit is contained in:
Al Viro 2022-08-09 19:41:40 -04:00 committed by Greg Kroah-Hartman
parent d04f9915fa
commit e7b4c812b9
2 changed files with 8 additions and 11 deletions

View File

@ -5,13 +5,4 @@
#include <uapi/asm/termios.h> #include <uapi/asm/termios.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
/* intr=^C quit=^\ erase=del kill=^U
eof=^D eol=\0 eol2=\0 sxtc=\0
start=^Q stop=^S susp=^Z dsusp=^Y
reprint=^R discard=^O werase=^W lnext=^V
vmin=\1 vtime=\0
*/
#define INIT_C_CC "\003\034\177\025\004\000\000\000\021\023\032\031\022\017\027\026\001"
#endif /* _SPARC_TERMIOS_H */ #endif /* _SPARC_TERMIOS_H */

View File

@ -5,13 +5,19 @@
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/termios.h> #include <asm/termios.h>
#ifndef INIT_C_CC
/* intr=^C quit=^\ erase=del kill=^U /* intr=^C quit=^\ erase=del kill=^U
eof=^D vtime=\0 vmin=\1 sxtc=\0 eof=^D vtime=\0 vmin=\1 sxtc=\0
start=^Q stop=^S susp=^Z eol=\0 start=^Q stop=^S susp=^Z eol=\0
reprint=^R discard=^O werase=^W lnext=^V reprint=^R discard=^O werase=^W lnext=^V
eol2=\0 eol2=\0
*/ */
#ifdef VDSUSP
#define INIT_C_CC_VDSUSP_EXTRA [VDSUSP] = 'Y'-0x40,
#else
#define INIT_C_CC_VDSUSP_EXTRA
#endif
#define INIT_C_CC { \ #define INIT_C_CC { \
[VINTR] = 'C'-0x40, \ [VINTR] = 'C'-0x40, \
[VQUIT] = '\\'-0x40, \ [VQUIT] = '\\'-0x40, \
@ -25,8 +31,8 @@
[VDISCARD] = 'O'-0x40, \ [VDISCARD] = 'O'-0x40, \
[VWERASE] = 'W'-0x40, \ [VWERASE] = 'W'-0x40, \
[VLNEXT] = 'V'-0x40, \ [VLNEXT] = 'V'-0x40, \
INIT_C_CC_VDSUSP_EXTRA \
[VMIN] = 1 } [VMIN] = 1 }
#endif
int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *); int user_termio_to_kernel_termios(struct ktermios *, struct termio __user *);
int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *); int kernel_termios_to_user_termio(struct termio __user *, struct ktermios *);