From d2dbe71fb3e6210b252db94ec214cee6df2ddb4f Mon Sep 17 00:00:00 2001 From: Alasdair G Kergon Date: Tue, 21 Feb 2017 11:25:18 +0000 Subject: [PATCH] dmsetup: Indicate device repetition in usage summaries. --- man/dmsetup.8.in | 20 ++++++++++---------- tools/dmsetup.c | 45 ++++++++++++++++++++++----------------------- 2 files changed, 32 insertions(+), 33 deletions(-) diff --git a/man/dmsetup.8.in b/man/dmsetup.8.in index bd26efa6a..4261fc4c1 100644 --- a/man/dmsetup.8.in +++ b/man/dmsetup.8.in @@ -41,7 +41,7 @@ dmsetup \(em low level logical volume management . BR deps . RB [ \-o . IR options ] -. RI [ device_name ] +. RI [ device_name ...] . ad b .. .CMD_DEPS @@ -58,7 +58,7 @@ dmsetup \(em low level logical volume management .B dmsetup .de CMD_INFO . BR info -. RI [ device_name ] +. RI [ device_name ...] .. .CMD_INFO . @@ -117,7 +117,7 @@ dmsetup \(em low level logical volume management .B dmsetup .de CMD_MANGLE . BR mangle -. RI [ device_name ] +. RI [ device_name ...] .. .CMD_MANGLE . @@ -135,7 +135,7 @@ dmsetup \(em low level logical volume management .B dmsetup .de CMD_MKNODES . BR mknodes -. RI [ device_name ] +. RI [ device_name ...] .. .CMD_MKNODES . @@ -159,7 +159,7 @@ dmsetup \(em low level logical volume management . RB [ \-f | \-\-force ] . RB [ \-\-retry ] . RB [ \-\-deferred ] -. IR device_name +. IR device_name ... . ad b .. .CMD_REMOVE @@ -197,7 +197,7 @@ dmsetup \(em low level logical volume management .de CMD_RESUME . ad l . BR resume -. IR device_name +. IR device_name ... . RB [ \-\-addnodeoncreate | \-\-addnodeonresume ] . RB [ \-\-noflush ] . RB [ \-\-nolockfs ] @@ -247,7 +247,7 @@ dmsetup \(em low level logical volume management . RB [ \-\-target . IR target_type ] . RB [ \-\-noflush ] -. RI [ device_name ] +. RI [ device_name ...] . ad b .. .CMD_STATUS @@ -259,7 +259,7 @@ dmsetup \(em low level logical volume management . BR suspend . RB [ \-\-nolockfs ] . RB [ \-\-noflush ] -. IR device_name +. IR device_name ... . ad b .. .CMD_SUSPEND @@ -272,7 +272,7 @@ dmsetup \(em low level logical volume management . RB [ \-\-target . IR target_type ] . RB [ \-\-showkeys ] -. RI [ device_name ] +. RI [ device_name ...] . ad b .. .CMD_TABLE @@ -354,7 +354,7 @@ dmsetup \(em low level logical volume management .de CMD_WIPE_TABLE . ad l . BR wipe_table -. IR device_name +. IR device_name ... . RB [ \-f | \-\-force ] . RB [ \-\-noflush ] . RB [ \-\-nolockfs ] diff --git a/tools/dmsetup.c b/tools/dmsetup.c index 64640692b..549a8c5d7 100644 --- a/tools/dmsetup.c +++ b/tools/dmsetup.c @@ -5726,32 +5726,32 @@ static int _stats_help(CMD_ARGS); * dmsetup stats [options] [device_name] * dmstats [options] [device_name] * - * clear [--allregions|--regionid id] [--alldevices|] + * clear [--allregions|--regionid id] [--alldevices|...] * create [--start [--length ] * [--areas ] [--areasize ] * [--programid ] [--userdata ] * [--bounds histogram_boundaries] [--precise] - * [--alldevices|] + * [--alldevices|...] * create --filemap [--nogroup] * [--programid ] [--userdata ] * [--bounds histogram_boundaries] [--precise] [] * delete [--allprograms|--programid id] * [--allregions|--regionid id] - * [--alldevices|] + * [--alldevices|...] * group [--alias NAME] --regions - * [--allprograms|--programid id] [--alldevices|] + * [--allprograms|--programid id] [--alldevices|...] * list [--allprograms|--programid id] [--allregions|--regionid id] * print [--clear] [--allprograms|--programid id] * [--allregions|--regionid id] - * [--alldevices|] + * [--alldevices|...] * report [--interval ] [--count ] * [--units ] [--programid ] [--regionid ] * [-o ] [-O|--sort ] * [-S|--select ] [--nameprefixes] * [--noheadings] [--separator ] - * [--allprograms|--programid id] [] + * [--allprograms|--programid id] [...] * ungroup --groupid [--allprograms|--programid id] - * [--alldevices|] + * [--alldevices|...] */ #define INDENT "\n\t " @@ -5766,7 +5766,7 @@ static int _stats_help(CMD_ARGS); #define EXTRA_OPTS HIST_OPTS PRECISE_OPTS #define ALL_PROGS_OPT "[--allprograms|--programid id] " #define ALL_REGIONS_OPT "[--allregions|--regionid id] " -#define ALL_DEVICES_OPT "[--alldevices|] " +#define ALL_DEVICES_OPT "[--alldevices|...] " #define ALL_PROGS_REGIONS_DEVICES ALL_PROGS_OPT INDENT ALL_REGIONS_OPT INDENT ALL_DEVICES_OPT #define FIELD_OPTS "[-o ] [-O|--sort ]" #define DM_REPORT_OPTS FIELD_OPTS INDENT "[-S|--select ] [--nameprefixes]" INDENT \ @@ -5795,7 +5795,7 @@ static struct command _stats_subcommands[] = { {"group", GROUP_OPTS, 1, -1, 1, 0, _stats_group}, {"list", ALL_PROGS_OPT ALL_REGIONS_OPT, 0, -1, 1, 0, _stats_report}, {"print", PRINT_OPTS, 0, -1, 1, 0, _stats_print}, - {"report", REPORT_OPTS "[]", 0, -1, 1, 0, _stats_report}, + {"report", REPORT_OPTS "[...]", 0, -1, 1, 0, _stats_report}, {"ungroup", "--groupid " UNGROUP_OPTS, 1, -1, 1, 0, _stats_ungroup}, {"update_filemap", "--groupid ", 1, 1, 0, 0, _stats_update_file}, {"version", "", 0, -1, 1, 0, _version}, @@ -5832,27 +5832,27 @@ static struct command _dmsetup_commands[] = { "\t [-u|uuid ] [--addnodeonresume|--addnodeoncreate]\n" "\t [--readahead {[+]|auto|none}]\n" "\t [-n|--notable|--table {|}]", 1, 2, 0, 0, _create}, - {"remove", "[--deferred] [-f|--force] [--retry] ", 0, -1, 1, 0, _remove}, + {"remove", "[--deferred] [-f|--force] [--retry] ...", 0, -1, 1, 0, _remove}, {"remove_all", "[-f|--force]", 0, 0, 0, 0, _remove_all}, - {"suspend", "[--noflush] [--nolockfs] ", 0, -1, 1, 0, _suspend}, - {"resume", "[--noflush] [--nolockfs] \n" + {"suspend", "[--noflush] [--nolockfs] ...", 0, -1, 1, 0, _suspend}, + {"resume", "[--noflush] [--nolockfs] ...\n" "\t [--addnodeonresume|--addnodeoncreate]\n" "\t [--readahead {[+]|auto|none}]", 0, -1, 1, 0, _resume}, {"load", " [
|]", 0, 2, 0, 0, _load}, {"clear", "", 0, -1, 1, 0, _clear}, {"reload", " [
|]", 0, 2, 0, 0, _load}, - {"wipe_table", "[-f|--force] [--noflush] [--nolockfs] ", 1, -1, 1, 0, _error_device}, + {"wipe_table", "[-f|--force] [--noflush] [--nolockfs] ...", 1, -1, 1, 0, _error_device}, {"rename", " [--setuuid] ", 1, 2, 0, 0, _rename}, {"message", " ", 2, -1, 0, 0, _message}, {"ls", "[--target ] [--exec ] [-o ] [--tree]", 0, 0, 0, 0, _ls}, - {"info", "[]", 0, -1, 1, 0, _info}, - {"deps", "[-o ] []", 0, -1, 1, 0, _deps}, - {"stats", " [] []", 1, -1, 1, 1, _stats}, - {"status", "[] [--noflush] [--target ]", 0, -1, 1, 0, _status}, - {"table", "[] [--target ] [--showkeys]", 0, -1, 1, 0, _status}, + {"info", "[...]", 0, -1, 1, 0, _info}, + {"deps", "[-o ] [...]", 0, -1, 1, 0, _deps}, + {"stats", " [] [...]", 1, -1, 1, 1, _stats}, + {"status", "[...] [--noflush] [--target ]", 0, -1, 1, 0, _status}, + {"table", "[...] [--target ] [--showkeys]", 0, -1, 1, 0, _status}, {"wait", " [] [--noflush]", 0, 2, 0, 0, _wait}, - {"mknodes", "[]", 0, -1, 1, 0, _mknodes}, - {"mangle", "[]", 0, -1, 1, 0, _mangle}, + {"mknodes", "[...]", 0, -1, 1, 0, _mknodes}, + {"mangle", "[...]", 0, -1, 1, 0, _mangle}, {"udevcreatecookie", "", 0, 0, 0, 0, _udevcreatecookie}, {"udevreleasecookie", "[]", 0, 1, 0, 0, _udevreleasecookie}, {"udevflags", "", 1, 1, 0, 0, _udevflags}, @@ -5894,8 +5894,7 @@ static void _stats_usage(FILE *out) for (i = 0; _stats_subcommands[i].name; i++) fprintf(out, "\t%s %s\n", _stats_subcommands[i].name, _stats_subcommands[i].help); - fprintf(out, "\n may be device name or -u or " - "-j -m \n"); + fprintf(out, "\n may be device name or (if only one) -u or -j -m \n"); fprintf(out, " are comma-separated. Use 'help -c' for list.\n"); fprintf(out, "\n"); } @@ -5920,7 +5919,7 @@ static void _dmsetup_usage(FILE *out) for (i = 0; _dmsetup_commands[i].name; i++) fprintf(out, "\t%s %s\n", _dmsetup_commands[i].name, _dmsetup_commands[i].help); - fprintf(out, "\n may be device name or -u or " + fprintf(out, "\n may be device name or (if only one) -u or " "-j -m \n"); fprintf(out, " is one of 'none', 'auto' and 'hex'.\n"); fprintf(out, " are comma-separated. Use 'help -c' for list.\n"); -- 2.43.5