aboutsummaryrefslogtreecommitdiffstats
path: root/src/du.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-06-21 15:03:35 +0000
committerJim Meyering <jim@meyering.net>2004-06-21 15:03:35 +0000
commit1ce7b61d0ea270b0c463198afca1cd0e214192fb (patch)
tree947f954d8a82091744d3809da651319e9d82001d /src/du.c
parentStandardize on the diagnostics given when someone gives (diff)
downloadcoreutils-1ce7b61d0ea270b0c463198afca1cd0e214192fb.tar.gz
coreutils-1ce7b61d0ea270b0c463198afca1cd0e214192fb.zip
(main): Standardize on the diagnostics given when someone gives
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included.
Diffstat (limited to 'src/du.c')
-rw-r--r--src/du.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/du.c b/src/du.c
index b8fe68c73..a4c9c03ef 100644
--- a/src/du.c
+++ b/src/du.c
@@ -735,9 +735,12 @@ main (int argc, char **argv)
/* When using --files0-from=F, you may not specify any files
on the command-line. */
if (optind < argc)
- error (EXIT_FAILURE, 0,
- _("%s: you may not specify command-line arguments with\
- --files0-from"), quotearg_colon (argv[optind]));
+ {
+ error (0, 0, _("extra operand %s"), quote (argv[optind]));
+ fprintf (stderr, "%s\n",
+ _("File operands cannot be combined with --files0-from."));
+ usage (EXIT_FAILURE);
+ }
istream = (STREQ (files_from, "-") ? stdin : fopen (files_from, "r"));
if (istream == NULL)