Gloops, sorry, here is the right patch :)
Samuel
diff -urp util-linux-2.12r/debian/changelog
util-linux-2.12r-mine/debian/changelog
--- util-linux-2.12r/debian/changelog 2006-11-06 23:57:22.000000000 +0100
+++ util-linux-2.12r-mine/debian/changelog 2006-11-07 00:03:13.000000000
+0100
@@ -1,3 +1,9 @@
+util-linux (2.12r-15youpi) unstable; urgency=low
+
+ * Add -8 option for claiming that the TTY is 8-bit clean. Closes: #221290
+
+ -- Samuel Thibault <[EMAIL PROTECTED]> Tue, 6 Nov 2006 23:55:30 +0100
+
util-linux (2.12r-15) unstable; urgency=low
* New amd64 rdev patch. Closes: #396842
diff -urp util-linux-2.12r/login-utils/agetty.8
util-linux-2.12r-mine/login-utils/agetty.8
--- util-linux-2.12r/login-utils/agetty.8 1999-11-03 00:28:11.000000000
+0100
+++ util-linux-2.12r-mine/login-utils/agetty.8 2006-11-06 23:56:11.000000000
+0100
@@ -3,7 +3,7 @@
agetty \- alternative Linux getty
.SH SYNOPSIS
-.BR "agetty " [\-ihLmnw]
+.BR "agetty " [\-8ihLmnw]
.RI "[-f " issue_file ]
.RI "[-l " login_program ]
.RI "[-I " init ]
@@ -13,7 +13,7 @@ agetty \- alternative Linux getty
.I baud_rate,...
.RI [ term ]
.br
-.BR "agetty " [\-ihLmnw]
+.BR "agetty " [\-8ihLmnw]
.RI "[-f " issue_file ]
.RI "[-l " login_program ]
.RI "[-I " init ]
@@ -92,6 +92,9 @@ whatever init(8) may have set, and is in
.fi
.ad
.TP
+\-8
+Assume that the tty is 8-bit clean, hence disable parity detection.
+.TP
\-h
Enable hardware (RTS/CTS) flow control. It is left up to the
application to disable software (XON/XOFF) flow protocol where
diff -urp util-linux-2.12r/login-utils/agetty.c
util-linux-2.12r-mine/login-utils/agetty.c
--- util-linux-2.12r/login-utils/agetty.c 2002-07-29 09:36:42.000000000
+0200
+++ util-linux-2.12r-mine/login-utils/agetty.c 2006-11-07 00:37:27.000000000
+0100
@@ -142,6 +142,7 @@ struct options {
char *issue; /* alternative issue file */
int numspeed; /* number of baud rates to try */
int speeds[MAX_SPEED]; /* baud rates to be tried */
+ int eightbits; /* assume 8bit-clean tty */
};
#define F_PARSE (1<<0) /* process modem status
messages */
@@ -399,8 +400,11 @@ parse_args(argc, argv, op)
extern int optind; /* getopt */
int c;
- while (isascii(c = getopt(argc, argv, "I:LH:f:hil:mt:wn"))) {
+ while (isascii(c = getopt(argc, argv, "8I:LH:f:hil:mt:wn"))) {
switch (c) {
+ case '8':
+ op->eightbits = 1;
+ break;
case 'I':
if (!(op->initstring = malloc(strlen(optarg)))) {
error(_("can't malloc initstring"));
@@ -1028,10 +1032,11 @@ char *get_logname(op, cp, tp)
if ((c == 0) && op->numspeed > 1)
return (0);
-
/* Do parity bit handling. */
- if (c != (ascval = (c & 0177))) { /* "parity" bit on ? */
+ if (op->eightbits) {
+ ascval = c;
+ } else if (c != (ascval = (c & 0177))) { /* "parity" bit on */
for (bits = 1, mask = 1; mask & 0177; mask <<= 1)
if (mask & ascval)
bits++; /* count "1" bits */
@@ -1192,7 +1197,7 @@ bcode(s)
void
usage()
{
- fprintf(stderr, _("Usage: %s [-hiLmw] [-l login_program] [-t timeout] [-I
initstring] [-H login_host] baud_rate,... line [termtype]\nor\t[-hiLmw] [-l
login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,...
[termtype]\n"), progname);
+ fprintf(stderr, _("Usage: %s [-8hiLmw] [-l login_program] [-t timeout] [-I
initstring] [-H login_host] baud_rate,... line [termtype]\nor\t[-hiLmw] [-l
login_program] [-t timeout] [-I initstring] [-H login_host] line baud_rate,...
[termtype]\n"), progname);
exit(1);
}