From: Paul Mackerras <paulus@samba.org>
To: torvalds@osdl.org, akpm@osdl.org
Cc: olh@suse.de, benh@kernel.crashing.org, anton@samba.org,
linux-kernel@vger.kernel.org, rth@twiddle.net,
sjmunroe@us.ibm.com
Date: Mon, 10 May 2004 09:22:47 +1000 [thread overview]
Message-ID: <16542.48455.327467.744190@cargo.ozlabs.ibm.com> (raw)
It turns out that we are not handling the TABDLY bits of the termios
c_oflag field correctly on PPC, PPC64 and Alpha. These three
architectures have a value for XTABS that is different from the TAB3
value. POSIX specifies that setting the TABDLY field to TAB3 should
result in tabs being expanded to spaces. In n_tty.c:opost() we check
for O_TABDLY(tty) == XTABS, which is fine on most architectures
because they have XTABS == TAB3.
I think the right thing to do is just to change the definition of
XTABS to be the same as TAB3 on these architectures. The patch below
does this for PPC and PPC64 (and I suggest the Alpha maintainer should
do the same). At the moment, applications using either the XTABS or
TAB3 values won't get the expected behaviour. With this patch, apps
that use TAB3 will get the expected behaviour. Apps that use XTABS
will need to be recompiled (but note that the POSIX-specified name to
use is TAB3 not XTABS).
Please apply.
Paul.
diff -urN linux-2.5/include/asm-ppc/termbits.h pmac-2.5/include/asm-ppc/termbits.h
--- linux-2.5/include/asm-ppc/termbits.h 2004-02-25 18:39:39.000000000 +1100
+++ pmac-2.5/include/asm-ppc/termbits.h 2004-05-10 08:50:02.279916200 +1000
@@ -81,6 +81,7 @@
#define TAB1 00002000
#define TAB2 00004000
#define TAB3 00006000
+#define XTABS 00006000 /* required by POSIX to == TAB3 */
#define CRDLY 00030000
#define CR0 00000000
#define CR1 00010000
@@ -95,7 +96,6 @@
#define VTDLY 00200000
#define VT0 00000000
#define VT1 00200000
-#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
/* c_cflag bit meaning */
#define CBAUD 0000377
diff -urN linux-2.5/include/asm-ppc64/termbits.h pmac-2.5/include/asm-ppc64/termbits.h
--- linux-2.5/include/asm-ppc64/termbits.h 2004-02-25 18:39:39.000000000 +1100
+++ pmac-2.5/include/asm-ppc64/termbits.h 2004-05-10 08:50:14.852001624 +1000
@@ -89,6 +89,7 @@
#define TAB1 00002000
#define TAB2 00004000
#define TAB3 00006000
+#define XTABS 00006000 /* required by POSIX to == TAB3 */
#define CRDLY 00030000
#define CR0 00000000
#define CR1 00010000
@@ -103,7 +104,6 @@
#define VTDLY 00200000
#define VT0 00000000
#define VT1 00200000
-#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
/* c_cflag bit meaning */
#define CBAUD 0000377
reply other threads:[~2004-05-09 23:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=16542.48455.327467.744190@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=akpm@osdl.org \
--cc=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olh@suse.de \
--cc=rth@twiddle.net \
--cc=sjmunroe@us.ibm.com \
--cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®