diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-02-16 14:42:43 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-02-16 14:42:43 +0000 |
commit | 7548e75065063dae256d94e6c7f4f9f43bd7f210 (patch) | |
tree | f23b000f8822f6eb70249c1106a3275deaa03bac /src/nproc.c | |
parent | ddefcddae2e97579f82320f4fd70d0ba14a52392 (diff) | |
parent | 974ab3dd887985e3aa347f3c6521f819296396a0 (diff) | |
download | coreutils-7548e75065063dae256d94e6c7f4f9f43bd7f210.tar.gz |
Merge tag 'upstream/8.21'
Upstream version 8.21
Diffstat (limited to 'src/nproc.c')
-rw-r--r-- | src/nproc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nproc.c b/src/nproc.c index a93ee536..5bd6610d 100644 --- a/src/nproc.c +++ b/src/nproc.c @@ -1,5 +1,5 @@ /* nproc - print the number of processors. - Copyright (C) 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2009-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -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) |