lkml.org 
[lkml]   [2022]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 6/7] termios: convert the last (sparc) INIT_C_CC to array
Date
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
arch/sparc/include/asm/termios.h | 8 --------
include/linux/termios_internal.h | 10 ++++++++--
2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/arch/sparc/include/asm/termios.h b/arch/sparc/include/asm/termios.h
index 6ad37199bee7..ba4b7517a3bb 100644
--- a/arch/sparc/include/asm/termios.h
+++ b/arch/sparc/include/asm/termios.h
@@ -17,14 +17,6 @@
#define _VMIN 4
#define _VTIME 5

-/* 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"
-
/*
* Translate a "termios" structure into a "termio". Ugh.
*
diff --git a/include/linux/termios_internal.h b/include/linux/termios_internal.h
index d525a8dc2045..7c92d64a7989 100644
--- a/include/linux/termios_internal.h
+++ b/include/linux/termios_internal.h
@@ -5,13 +5,19 @@
#include <linux/uaccess.h>
#include <asm/termios.h>

-#ifndef INIT_C_CC
/* intr=^C quit=^\ erase=del kill=^U
eof=^D vtime=\0 vmin=\1 sxtc=\0
start=^Q stop=^S susp=^Z eol=\0
reprint=^R discard=^O werase=^W lnext=^V
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 { \
[VINTR] = 'C'-0x40, \
[VQUIT] = '\\'-0x40, \
@@ -25,8 +31,8 @@
[VDISCARD] = 'O'-0x40, \
[VWERASE] = 'W'-0x40, \
[VLNEXT] = 'V'-0x40, \
+ INIT_C_CC_VDSUSP_EXTRA \
[VMIN] = 1 }
-#endif

#ifndef user_termio_to_kernel_termios
/*
--
2.30.2
\
 
 \ /
  Last update: 2022-08-20 05:39    [W:0.143 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site