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 <kzak@redhat.com>
This commit is contained in:
Karel Zak 2014-11-21 08:43:14 +01:00
parent adc9f78cfc
commit 14da9b1f3d
1 changed files with 4 additions and 2 deletions

View File

@ -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++;
}
}
}