From: Eric Andersen Date: Fri, 22 Sep 2000 00:40:39 +0000 (-0000) Subject: Apply a bandaid suggested by Jon McClintock , since deallocvt X-Git-Tag: 0_47~36 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a1b35c4512dfb37227bfcb244d717119d39899ae;p=oweals%2Fbusybox.git Apply a bandaid suggested by Jon McClintock , since deallocvt has code for handling no arguments, but the usage checking code aborted if there are any other than two arguments. -Erik --- diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c index 9c477d238..a5b5a03f0 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c @@ -17,7 +17,7 @@ int deallocvt_main(int argc, char *argv[]) { int fd, num, i; - if ((argc != 2) || (**(argv + 1) == '-')) + if ((argc > 2) || ((argv == 2) && (**(argv + 1) == '-'))) usage(deallocvt_usage); fd = get_console_fd("/dev/console"); diff --git a/deallocvt.c b/deallocvt.c index 9c477d238..a5b5a03f0 100644 --- a/deallocvt.c +++ b/deallocvt.c @@ -17,7 +17,7 @@ int deallocvt_main(int argc, char *argv[]) { int fd, num, i; - if ((argc != 2) || (**(argv + 1) == '-')) + if ((argc > 2) || ((argv == 2) && (**(argv + 1) == '-'))) usage(deallocvt_usage); fd = get_console_fd("/dev/console");