diff options
author | Karel Zak | 2014-11-21 09:03:00 +0100 |
---|---|---|
committer | Karel Zak | 2014-11-21 09:03:00 +0100 |
commit | 914047b498a377944699b59ec93deddd4de9d63d (patch) | |
tree | 447fd2c6637f7b2e29460971e68ba00100245d25 /term-utils/agetty.c | |
parent | agetty: don't ignore TERM (diff) | |
download | kernel-qcow2-util-linux-914047b498a377944699b59ec93deddd4de9d63d.tar.gz kernel-qcow2-util-linux-914047b498a377944699b59ec93deddd4de9d63d.tar.xz kernel-qcow2-util-linux-914047b498a377944699b59ec93deddd4de9d63d.zip |
agetty: keep the current baud before try 9600 on serial lines
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'term-utils/agetty.c')
-rw-r--r-- | term-utils/agetty.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 5181de150..34ad7f230 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -387,9 +387,11 @@ int main(int argc, char **argv) tcsetpgrp(STDIN_FILENO, getpid()); - /* Default serial line speed (may be ignored on --{extract,keep}-baud) */ - if ((options.flags & F_VCONSOLE) == 0 && options.numspeed == 0) + /* Default is to follow the current line speend and then default to 9600 */ + if ((options.flags & F_VCONSOLE) == 0 && options.numspeed == 0) { options.speeds[options.numspeed++] = bcode("9600"); + options.flags |= F_KEEPSPEED + } /* Initialize the termios settings (raw mode, eight-bit, blocking i/o). */ debug("calling termio_init\n"); |