From 14da9b1f3da60d1c77a9a18fc3c4c9298839ae0e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 21 Nov 2014 08:43:14 +0100 Subject: agetty: don't ignore TERM Fix command line parsing to not ignore term setting if no baud specified, for example: /sbin/agetty ttyS0 vt100 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 cda0ab731..5181de150 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -803,9 +803,11 @@ static void parse_args(int argc, char **argv, struct options *op) } else { op->tty = argv[optind++]; if (argc > optind) { - char *v = argv[optind++]; - if (is_speed(v)) + char *v = argv[optind]; + if (is_speed(v)) { parse_speeds(op, v); + optind++; + } } } -- cgit v1.2.3-55-g7522