diff options
author | Rob Landley <rob@landley.net> | 2007-06-18 00:12:43 -0400 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2007-06-18 00:12:43 -0400 |
commit | 7aa9d8fbf1d56a5b41fb007c0bf2089a6e3dae98 (patch) | |
tree | aff7eebbe4d1c27cc3ece1e99d8549ec1e5c774d | |
parent | 0d8dfb2b905c374a65c2ca245bf588444aec5fff (diff) | |
download | toybox-7aa9d8fbf1d56a5b41fb007c0bf2089a6e3dae98.tar.gz |
Fix "Need 1 arguments".
-rw-r--r-- | lib/args.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -296,8 +296,10 @@ notflag: } // Sanity check - if (optarg<minargs) error_exit("Need %d arguments", minargs); - if (optarg>maxargs) error_exit("Max %d arguments", maxargs); + if (optarg<minargs) + error_exit("Need %d argument%s", minargs, minargs ? "s" : ""); + if (optarg>maxargs) + error_exit("Max %d argument%s", maxargs, maxargs ? "s" : ""); } // Loop through files listed on the command line |