diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nproc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nproc.c b/src/nproc.c index a93ee536b..98a1b9aca 100644 --- a/src/nproc.c +++ b/src/nproc.c @@ -24,6 +24,7 @@ #include "system.h" #include "error.h" #include "nproc.h" +#include "quote.h" #include "xstrtol.h" /* The official name of this program (e.g., no 'g' prefix). */ @@ -113,6 +114,12 @@ main (int argc, char **argv) } } + if (argc != optind) + { + error (0, 0, _("extra operand %s"), quote (argv[optind])); + usage (EXIT_FAILURE); + } + nproc = num_processors (mode); if (ignore < nproc) |