diff options
-rw-r--r-- | term-utils/agetty.8 | 6 | ||||
-rw-r--r-- | term-utils/agetty.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/term-utils/agetty.8 b/term-utils/agetty.8 index 4ef1e6b8c..12e481f6c 100644 --- a/term-utils/agetty.8 +++ b/term-utils/agetty.8 @@ -70,8 +70,10 @@ the list, which is treated as if it were circular. Baud rates should be specified in descending order, so that the null character (Ctrl\-@) can also be used for baud-rate switching. .sp -This argument is optional and unnecessary for virtual terminals. -The default for serial terminals is '9600'. +This argument is optional and unnecessary for \fBvirtual terminals\fP. +.sp +The default for \fBserial terminals\fP is keep the current baud rate +(see \fB\-\-keep-baud\fP) and if unsuccessful then default to '9600'. .TP term The value to be used for the TERM environment variable. This overrides 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"); |