diff options
Diffstat (limited to 'src/chmod.c')
-rw-r--r-- | src/chmod.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/chmod.c b/src/chmod.c index de93b0f0c..b955b3f88 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -140,17 +140,18 @@ main (argc, argv) } } - if (modeind == 0) - modeind = optind++; - if (optind >= argc) - usage (); - if (flag_version) fprintf (stderr, "%s\n", version_string); if (flag_help) usage (); + if (modeind == 0) + modeind = optind++; + + if (optind >= argc) + usage (); + changes = mode_compile (argv[modeind], MODE_MASK_EQUALS | MODE_MASK_PLUS | MODE_MASK_MINUS); if (changes == MODE_INVALID) @@ -288,7 +289,8 @@ static void usage () { fprintf (stderr, "\ -Usage: %s [-Rcfv] mode file...\n\ +Usage: %s [-Rcfv] [--recursive] [--changes] [--silent] [--quiet]\n\ + [--verbose] [--help] [--version] mode file...\n\ mode is [ugoa...][[+-=][rwxXstugo...]...][,...] or octal number\n", program_name); exit (1); |