summaryrefslogtreecommitdiff
path: root/src/du.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-04-04 14:41:38 +0000
committerJim Meyering <jim@meyering.net>1993-04-04 14:41:38 +0000
commita92a94f719519ab5a06a2b704c656de9b4c4dc1c (patch)
tree0539f01dbe189f038925e9fb4e5bd111df213c12 /src/du.c
parentdc932e0a18cfa5a754dbfae62457d8ed7fffa2e7 (diff)
downloadcoreutils-a92a94f719519ab5a06a2b704c656de9b4c4dc1c.tar.xz
(usage): Mention --help and --version.
(main): Handle flag_help and flag_version before checking for invocation errors.
Diffstat (limited to 'src/du.c')
-rw-r--r--src/du.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/du.c b/src/du.c
index 90cb303b0..3d845e90c 100644
--- a/src/du.c
+++ b/src/du.c
@@ -188,7 +188,7 @@ usage (reason)
fprintf (stderr, "\
Usage: %s [-abcklsxDLS] [--all] [--total] [--count-links] [--summarize]\n\
[--bytes] [--kilobytes] [--one-file-system] [--separate-dirs]\n\
- [--dereference] [--dereference-args] [path...]\n",
+ [--dereference] [--dereference-args] [--help] [--version] [path...]\n",
program_name);
exit (2);
@@ -258,14 +258,14 @@ main (argc, argv)
}
}
- if (opt_all && opt_summarize_only)
- usage ("cannot both summarize and show all entries");
-
if (flag_version)
fprintf (stderr, "%s\n", version_string);
if (flag_help)
- usage ("");
+ usage (NULL);
+
+ if (opt_all && opt_summarize_only)
+ usage ("cannot both summarize and show all entries");
/* Initialize the hash structure for inode numbers. */
hash_init (INITIAL_HASH_MODULE, INITIAL_ENTRY_TAB_SIZE);