From a92a94f719519ab5a06a2b704c656de9b4c4dc1c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 4 Apr 1993 14:41:38 +0000 Subject: (usage): Mention --help and --version. (main): Handle flag_help and flag_version before checking for invocation errors. --- src/du.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/du.c') 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); -- cgit v1.2.3-70-g09d2