summaryrefslogtreecommitdiffstats
path: root/term-utils/agetty.c
diff options
context:
space:
mode:
authorKarel Zak2011-09-26 12:34:10 +0200
committerKarel Zak2011-09-26 12:34:10 +0200
commitb9261127260ff2a8efbdc6e5f9d00ec7f736b445 (patch)
treefe728b0cc720a74683cd4952306275b34f620875 /term-utils/agetty.c
parentmount: check for target before source on remount (diff)
downloadkernel-qcow2-util-linux-b9261127260ff2a8efbdc6e5f9d00ec7f736b445.tar.gz
kernel-qcow2-util-linux-b9261127260ff2a8efbdc6e5f9d00ec7f736b445.tar.xz
kernel-qcow2-util-linux-b9261127260ff2a8efbdc6e5f9d00ec7f736b445.zip
agetty: test ECHO on c_lflag
Reported-by: xinglp <xinglp@gmail.com> Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=739522 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'term-utils/agetty.c')
-rw-r--r--term-utils/agetty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 8398015cc..75c2b1453 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -1466,7 +1466,7 @@ static char *get_logname(struct options *op, struct termios *tp, struct chardata
case '#':
cp->erase = ascval; /* set erase character */
if (bp > logname) {
- if ((tp->c_cflag & (ECHO)) == 0)
+ if ((tp->c_lflag & ECHO) == 0)
write_all(1, erase[cp->parity], 3);
bp--;
}
@@ -1475,7 +1475,7 @@ static char *get_logname(struct options *op, struct termios *tp, struct chardata
case '@':
cp->kill = ascval; /* set kill character */
while (bp > logname) {
- if ((tp->c_cflag & (ECHO)) == 0)
+ if ((tp->c_lflag & ECHO) == 0)
write_all(1, erase[cp->parity], 3);
bp--;
}
@@ -1487,7 +1487,7 @@ static char *get_logname(struct options *op, struct termios *tp, struct chardata
break;
if ((size_t)(bp - logname) >= sizeof(logname) - 1)
log_err(_("%s: input overrun"), op->tty);
- if ((tp->c_cflag & (ECHO)) == 0)
+ if ((tp->c_lflag & ECHO) == 0)
write_all(1, &c, 1); /* echo the character */
*bp++ = ascval; /* and store it */
break;