Thanks for the input;  I won't persue such verbose usages any longer.

Another attempt was to continue grouping the commands by their arguments:

        $ ldomctl -h
        usage:  ldomctl command [argument ...]
                ldomctl delete|select configuration
                ldomctl download directory
                ldomctl dump
                ldomctl list
                ldomctl init-system file
                ldomctl panic|start|status|stop [domain]

But this still seems long enough and even harder to read, so the
following patch simply cuts it to the synopsis as per the manual:

        $ ldomctl -h
        usage: ldomctl command [argument ...]

It contains less information than before, but is actually consistent
and not incomplete any longer, which bothers me with the current usage.

Feedback? Obections? OK?

Index: ldomctl.c
===================================================================
RCS file: /cvs/src/usr.sbin/ldomctl/ldomctl.c,v
retrieving revision 1.21
diff -u -p -r1.21 ldomctl.c
--- ldomctl.c   15 Sep 2018 13:20:16 -0000      1.21
+++ ldomctl.c   1 Jul 2019 19:45:59 -0000
@@ -157,10 +157,7 @@ main(int argc, char **argv)
 void
 usage(void)
 {
-       extern char *__progname;
-
-       fprintf(stderr, "usage: %s start|stop|panic domain\n", __progname);
-       fprintf(stderr, "       %s status [domain]\n", __progname);
+       fprintf(stderr, "usage: %s command [argument ...]\n", getprogname());
        exit(EXIT_FAILURE);
 }
 

Reply via email to