From 914047b498a377944699b59ec93deddd4de9d63d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 21 Nov 2014 09:03:00 +0100 Subject: agetty: keep the current baud before try 9600 on serial lines Signed-off-by: Karel Zak --- term-utils/agetty.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'term-utils/agetty.c') 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"); -- cgit v1.2.3-55-g7522