diff options
author | pjd <pjd@FreeBSD.org> | 2005-03-14 14:25:47 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2005-03-14 14:25:47 +0000 |
commit | 4c29f3b1e144e0562661edf820a97f643a112602 (patch) | |
tree | 11c8d9050e8b146bae47d7142c7caaa6872af589 /sbin/geom/class/stripe | |
parent | 70e7ef2f360c7cc14d38b7f95484ea920cd3ea66 (diff) | |
download | FreeBSD-src-4c29f3b1e144e0562661edf820a97f643a112602.zip FreeBSD-src-4c29f3b1e144e0562661edf820a97f643a112602.tar.gz |
Define subcommands' usage inside g_command structure.
MFC after: 1 week
Diffstat (limited to 'sbin/geom/class/stripe')
-rw-r--r-- | sbin/geom/class/stripe/geom_stripe.c | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/sbin/geom/class/stripe/geom_stripe.c b/sbin/geom/class/stripe/geom_stripe.c index 0320b27..d3fec88 100644 --- a/sbin/geom/class/stripe/geom_stripe.c +++ b/sbin/geom/class/stripe/geom_stripe.c @@ -54,51 +54,46 @@ static void stripe_dump(struct gctl_req *req); static void stripe_label(struct gctl_req *req); struct g_command class_commands[] = { - { "clear", G_FLAG_VERBOSE, stripe_main, G_NULL_OPTS }, + { "clear", G_FLAG_VERBOSE, stripe_main, G_NULL_OPTS, + "[-v] prov ..." + }, { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, { { 's', "stripesize", &stripesize, G_TYPE_NUMBER }, G_OPT_SENTINEL - } + }, + "[-hv] [-s stripesize] name prov prov ..." }, { "destroy", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_NONE }, G_OPT_SENTINEL - } + }, + "[-fv] name ..." + }, + { "dump", 0, stripe_main, G_NULL_OPTS, + "dump prov ..." }, - { "dump", 0, stripe_main, G_NULL_OPTS }, { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, stripe_main, { { 'h', "hardcode", NULL, G_TYPE_NONE }, { 's', "stripesize", &stripesize, G_TYPE_NUMBER }, G_OPT_SENTINEL - } + }, + "[-hv] [-s stripesize] name prov prov ..." }, { "stop", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_NONE }, G_OPT_SENTINEL - } + }, + "[-fv] name ..." }, G_CMD_SENTINEL }; static int verbose = 0; -void usage(const char *name); -void -usage(const char *name) -{ - - fprintf(stderr, "usage: %s create [-hv] [-s stripesize] name prov prov ...\n", name); - fprintf(stderr, " %s destroy [-fv] name ...\n", name); - fprintf(stderr, " %s label [-hv] [-s stripesize] name prov prov ...\n", name); - fprintf(stderr, " %s stop [-fv] name ...\n", name); - fprintf(stderr, " %s clear [-v] prov ...\n", name); - fprintf(stderr, " %s dump prov ...\n", name); -} - static void stripe_main(struct gctl_req *req, unsigned flags) { |