diff options
author | Jim Meyering <jim@meyering.net> | 1993-04-04 14:41:38 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1993-04-04 14:41:38 +0000 |
commit | a92a94f719519ab5a06a2b704c656de9b4c4dc1c (patch) | |
tree | 0539f01dbe189f038925e9fb4e5bd111df213c12 /src/du.c | |
parent | dc932e0a18cfa5a754dbfae62457d8ed7fffa2e7 (diff) | |
download | coreutils-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.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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); |