diff options
Diffstat (limited to 'term-utils/agetty.c')
-rw-r--r-- | term-utils/agetty.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 5020d7f4e..5c602fcbe 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -477,9 +477,12 @@ parse_args(argc, argv, op) usage(stderr); } } - debug("after getopt loop\n"); - if (argc < optind + 2) /* check parameter count */ + debug("after getopt loop\n"); + + if (argc < optind + 2) { /* check parameter count */ + warnx(_("not enough arguments")); usage(stderr); + } /* we loosen up a bit and accept both "baudrate tty" and "tty baudrate" */ if('0' <= argv[optind][0] && argv[optind][0] <= '9') { @@ -1339,5 +1342,5 @@ error(const char *fmt, ...) { } #endif (void) sleep((unsigned) 10); /* be kind to init(8) */ - exit(1); + exit(EXIT_FAILURE); } |