All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: linux-arch@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH v2 5/8] termios: consolidate values for VDISCARD in INIT_C_CC
Date: Sun, 21 Aug 2022 02:02:36 +0100	[thread overview]
Message-ID: <20220821010239.1554132-5-viro@zeniv.linux.org.uk> (raw)
In-Reply-To: <20220821010239.1554132-1-viro@zeniv.linux.org.uk>

On old systems it used to be ^O.  Linux had never actually used
the value, but INIT_C_CC (on i386) did initialize it to ^O;
unfortunately, it had a typo in the comment claiming that to be
^U.  Most of the architectures copied the (correct) definition
along with mistaken comment.  alpha, powerpc and sparc tried
to make the definition match comment.

However, util-linux still resets it to ^O on any architecture,
^O is the historical value, kernel ignores it anyway and finally,
Linus said "Just change everybody to do the same, nobody cares
about VDISCARD".

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 arch/alpha/include/asm/termios.h   | 4 ++--
 arch/mips/include/asm/termios.h    | 2 +-
 arch/powerpc/include/asm/termios.h | 4 ++--
 arch/sparc/include/asm/termios.h   | 4 ++--
 include/linux/termios_internal.h   | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/alpha/include/asm/termios.h b/arch/alpha/include/asm/termios.h
index 17b109859e05..9cc784d0a83c 100644
--- a/arch/alpha/include/asm/termios.h
+++ b/arch/alpha/include/asm/termios.h
@@ -8,9 +8,9 @@
 /*	eof=^D		eol=\0		eol2=\0		erase=del
 	werase=^W	kill=^U		reprint=^R	sxtc=\0
 	intr=^C		quit=^\		susp=^Z		<OSF/1 VDSUSP>
-	start=^Q	stop=^S		lnext=^V	discard=^U
+	start=^Q	stop=^S		lnext=^V	discard=^O
 	vmin=\1		vtime=\0
 */
-#define INIT_C_CC "\004\000\000\177\027\025\022\000\003\034\032\000\021\023\026\025\001\000"
+#define INIT_C_CC "\004\000\000\177\027\025\022\000\003\034\032\000\021\023\026\017\001\000"
 
 #endif	/* _ALPHA_TERMIOS_H */
diff --git a/arch/mips/include/asm/termios.h b/arch/mips/include/asm/termios.h
index dbb62330b7a4..059c800afaa1 100644
--- a/arch/mips/include/asm/termios.h
+++ b/arch/mips/include/asm/termios.h
@@ -16,7 +16,7 @@
  *	intr=^C		quit=^\		erase=del	kill=^U
  *	vmin=\1		vtime=\0	eol2=\0		swtc=\0
  *	start=^Q	stop=^S		susp=^Z		vdsusp=
- *	reprint=^R	discard=^U	werase=^W	lnext=^V
+ *	reprint=^R	discard=^O	werase=^W	lnext=^V
  *	eof=^D		eol=\0
  */
 #define INIT_C_CC "\003\034\177\025\1\0\0\0\021\023\032\0\022\017\027\026\004\0"
diff --git a/arch/powerpc/include/asm/termios.h b/arch/powerpc/include/asm/termios.h
index 5c003322fe29..e18a05a6ed34 100644
--- a/arch/powerpc/include/asm/termios.h
+++ b/arch/powerpc/include/asm/termios.h
@@ -10,7 +10,7 @@
 
 #include <uapi/asm/termios.h>
 
-/*                   ^C  ^\ del  ^U  ^D   1   0   0   0   0  ^W  ^R  ^Z  ^Q  ^S  ^V  ^U  */
-#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" 
+/*                   ^C  ^\ del  ^U  ^D   1   0   0   0   0  ^W  ^R  ^Z  ^Q  ^S  ^V  ^O  */
+#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\017"
 
 #endif	/* _ASM_POWERPC_TERMIOS_H */
diff --git a/arch/sparc/include/asm/termios.h b/arch/sparc/include/asm/termios.h
index bafd7768f309..60f90465fc12 100644
--- a/arch/sparc/include/asm/termios.h
+++ b/arch/sparc/include/asm/termios.h
@@ -9,9 +9,9 @@
 /*	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=^U	werase=^W	lnext=^V
+	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\025\027\026\001"
+#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 */
diff --git a/include/linux/termios_internal.h b/include/linux/termios_internal.h
index 103ca0370948..7eb3598c109d 100644
--- a/include/linux/termios_internal.h
+++ b/include/linux/termios_internal.h
@@ -9,7 +9,7 @@
 /*	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=^U	werase=^W	lnext=^V
+	reprint=^R	discard=^O	werase=^W	lnext=^V
 	eol2=\0
 */
 #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
-- 
2.30.2


  parent reply	other threads:[~2022-08-21  1:02 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-20  3:33 [RFC][PATCHES] termios.h cleanups Al Viro
2022-08-20  3:37 ` [PATCH 1/7] loongarch: remove generic-y += termios.h Al Viro
2022-08-20  3:37   ` [PATCH 2/7] termios: get rid of stray asm/termios.h include in n_hdlc.c Al Viro
2022-08-20  3:37   ` [PATCH 3/7] start unifying INIT_C_CC and termios convertors Al Viro
2022-08-20  3:37   ` [PATCH 4/7] termios: consolidate values for VDISCARD in INIT_C_CC Al Viro
2022-08-20 18:01     ` Linus Torvalds
2022-08-20 18:27       ` Al Viro
2022-08-20  3:37   ` [PATCH 5/7] make generic INIT_C_CC a bit more generic Al Viro
2022-08-20  3:37   ` [PATCH 6/7] termios: convert the last (sparc) INIT_C_CC to array Al Viro
2022-08-20  3:37   ` [PATCH 7/7] termios: get rid of non-UAPI asm/termios.h Al Viro
2022-08-20 18:14 ` [RFC][PATCHES] termios.h cleanups Linus Torvalds
2022-08-20 18:43   ` Al Viro
2022-08-20 21:44     ` Linus Torvalds
2022-08-21  0:30       ` Al Viro
2022-08-21  1:02         ` [PATCH v2 1/8] loongarch: remove generic-y += termios.h Al Viro
2022-08-21  1:02           ` [PATCH v2 2/8] termios: get rid of stray asm/termios.h include in n_hdlc.c Al Viro
2022-08-21  1:02           ` [PATCH v2 3/8] termios: uninline conversion helpers Al Viro
2022-08-30 12:26             ` Greg Kroah-Hartman
2022-09-01 17:03               ` Al Viro
2022-09-01 17:06                 ` [PATCH v3 1/6] " Al Viro
2022-09-01 17:06                 ` [PATCH v3 2/6] termios: start unifying non-UAPI parts of asm/termios.h Al Viro
2022-09-01 17:07                 ` [PATCH v3 3/6] termios: consolidate values for VDISCARD in INIT_C_CC Al Viro
2022-09-01 17:07                 ` [PATCH v3 4/6] make generic INIT_C_CC a bit more generic Al Viro
2022-09-01 17:08                 ` [PATCH v3 5/6] termios: convert the last (sparc) INIT_C_CC to array Al Viro
2022-09-01 17:08                 ` [PATCH v3 6/6] termios: get rid of non-UAPI asm/termios.h Al Viro
2022-09-02  5:32                   ` [PATCH v3 7/6] termios: kill uapi termios.h that are identical to generic one Al Viro
2022-09-09  8:45                 ` [PATCH v2 3/8] termios: uninline conversion helpers Greg Kroah-Hartman
2022-08-21  1:02           ` [PATCH v2 4/8] termios: start unifying non-UAPI parts of asm/termios.h Al Viro
2022-08-21  5:13             ` Al Viro
2022-08-21  1:02           ` Al Viro [this message]
2022-08-21  1:02           ` [PATCH v2 6/8] make generic INIT_C_CC a bit more generic Al Viro
2022-08-21  1:02           ` [PATCH v2 7/8] termios: convert the last (sparc) INIT_C_CC to array Al Viro
2022-08-21  1:02           ` [PATCH v2 8/8] termios: get rid of non-UAPI asm/termios.h Al Viro
2022-08-21 14:56           ` [PATCH v2 1/8] loongarch: remove generic-y += termios.h Huacai Chen
2022-08-21 14:58             ` Huacai Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220821010239.1554132-5-viro@zeniv.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.