]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-cmd-print-help-in-cases-without-subcommands-20030203
authorMatt Bacchi <mbacchi@gmavt.net>
Mon, 3 Feb 2003 23:16:20 +0000 (23:16 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 3 Feb 2003 23:16:20 +0000 (23:16 +0000)
FIXES 1277

so libcmd supports help for e.g. pt_util

(cherry picked from commit d32c70edbc0ed4e4821deb5542ef11637e8c04e0)

src/cmd/cmd.c

index 906a3485464cb0a6388eff731f331f359d0cf90d..68e730a67b4ae18bbd50d7d7e7f24f737ab7f34d 100644 (file)
@@ -784,6 +784,9 @@ char **argv;
        otherwise it is a real nuisance */
     if (ts->parms[CMD_HELPPARM].items) {
        PrintSyntax(ts);
+       /* Display full help syntax if we don't have subcommands */
+       if (noOpcodes)
+           PrintFlagHelp(ts);
        ResetSyntax(ts);
        return 0;
     }