]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
aggety: don't wipe CLOCAL flag
authorKarel Zak <kzak@redhat.com>
Mon, 12 Jul 2010 09:57:55 +0000 (11:57 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 18 Aug 2010 07:38:49 +0000 (09:38 +0200)
gettey should not clear the flag. It seems that the flag is
automatically enabled for serial consoles tht don't use CD signal.

Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=598631
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/agetty.c

index 9fc389b863a8a543f25f20b1843d60aeedfe7f1b..254194816495a10004e1b42ee920c8d82b1fb2bf 100644 (file)
@@ -709,7 +709,7 @@ termio_init(tp, op)
     /* flush input and output queues, important for modems! */
     (void) tcflush(0, TCIOFLUSH);
 
-    tp->c_cflag = CS8 | HUPCL | CREAD;
+    tp->c_cflag = CS8 | HUPCL | CREAD | (tp->c_cflag & CLOCAL);
 
     if (!(op->flags & F_KEEPSPEED)) {
            cfsetispeed(tp, op->speeds[FIRST_SPEED]);