1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

dmsetup: join large fprintf

Concatenate strings and make binary slightly smaller.
This commit is contained in:
Zdenek Kabelac 2018-03-12 11:41:12 +01:00
parent 5f5db7cf41
commit 9476cf8cdc

View File

@ -6257,32 +6257,32 @@ static void _stats_usage(FILE *out)
{ {
int i; int i;
fprintf(out, "Usage:\n\n"); fprintf(out, "Usage:\n\n"
fprintf(out, "%s\n", _base_commands[_base_command].name); "%s\n"
fprintf(out, " [-h|--help]\n"); " [-h|--help]\n"
fprintf(out, " [-v|--verbose [-v|--verbose ...]]\n"); " [-v|--verbose [-v|--verbose ...]]\n"
fprintf(out, " [--areas <nr_areas>] [--areasize <size>]\n"); " [--areas <nr_areas>] [--areasize <size>]\n"
fprintf(out, " [--userdata <data>] [--clear]\n"); " [--userdata <data>] [--clear]\n"
fprintf(out, " [--count <count>] [--interval <seconds>]\n"); " [--count <count>] [--interval <seconds>]\n"
fprintf(out, " [-o <fields>] [-O|--sort <sort_fields>]\n"); " [-o <fields>] [-O|--sort <sort_fields>]\n"
fprintf(out, " [--programid <id>]\n"); " [--programid <id>]\n"
fprintf(out, " [--start <start>] [--length <length>]\n"); " [--start <start>] [--length <length>]\n"
fprintf(out, " [--segments] [--units <units>]\n\n"); " [--segments] [--units <units>]\n\n",
_base_commands[_base_command].name);
for (i = 0; _stats_subcommands[i].name; i++) for (i = 0; _stats_subcommands[i].name; i++)
fprintf(out, "\t%s %s\n", _stats_subcommands[i].name, _stats_subcommands[i].help); fprintf(out, "\t%s %s\n", _stats_subcommands[i].name, _stats_subcommands[i].help);
fprintf(out, "\n<device> may be device name or (if only one) -u <uuid> or -j <major> -m <minor>\n"); fprintf(out, "\n<device> may be device name or (if only one) -u <uuid> or -j <major> -m <minor>\n"
fprintf(out, "<fields> are comma-separated. Use 'help -c' for list.\n"); "<fields> are comma-separated. Use 'help -c' for list.\n\n");
putc('\n', out);
} }
static void _dmsetup_usage(FILE *out) static void _dmsetup_usage(FILE *out)
{ {
int i; int i;
fprintf(out, "Usage:\n\n"); fprintf(out, "Usage:\n\n"
fprintf(out, "%s\n" "%s\n"
" [--version] [-h|--help [-c|-C|--columns]]\n" " [--version] [-h|--help [-c|-C|--columns]]\n"
" [-v|--verbose [-v|--verbose ...]] [-f|--force]\n" " [-v|--verbose [-v|--verbose ...]] [-f|--force]\n"
" [--checks] [--manglename {none|hex|auto}]\n" " [--checks] [--manglename {none|hex|auto}]\n"
@ -6298,27 +6298,27 @@ static void _dmsetup_usage(FILE *out)
fprintf(out, "\t%s %s\n", _dmsetup_commands[i].name, _dmsetup_commands[i].help); fprintf(out, "\t%s %s\n", _dmsetup_commands[i].name, _dmsetup_commands[i].help);
fprintf(out, "\n<device> may be device name or (if only one) -u <uuid> or " fprintf(out, "\n<device> may be device name or (if only one) -u <uuid> or "
"-j <major> -m <minor>\n"); "-j <major> -m <minor>\n"
fprintf(out, "<mangling_mode> is one of 'none', 'auto' and 'hex'.\n"); "<mangling_mode> is one of 'none', 'auto' and 'hex'.\n"
fprintf(out, "<fields> are comma-separated. Use 'help -c' for list.\n"); "<fields> are comma-separated. Use 'help -c' for list.\n"
fprintf(out, "<concise_device_specification> has single-device entries separated by semi-colons:\n" "<concise_device_specification> has single-device entries separated by semi-colons:\n"
" <name>,<uuid>,<minor>,<flags>,<table>\n" " <name>,<uuid>,<minor>,<flags>,<table>\n"
" where <flags> is 'ro' or 'rw' (the default) and any of <uuid>, <minor>\n" " where <flags> is 'ro' or 'rw' (the default) and any of <uuid>, <minor>\n"
" and <flags> may be empty. Separate extra table lines with commas.\n" " and <flags> may be empty. Separate extra table lines with commas.\n"
" E.g.: dev1,,,,0 100 linear 253:1 0,100 100 error;dev2,,,ro,0 1 error\n"); " E.g.: dev1,,,,0 100 linear 253:1 0,100 100 error;dev2,,,ro,0 1 error\n"
fprintf(out, "Table_file contents may be supplied on stdin.\n"); "Table_file contents may be supplied on stdin.\n"
fprintf(out, "Options are: devno, devname, blkdevname.\n"); "Options are: devno, devname, blkdevname.\n"
fprintf(out, "Tree specific options are: ascii, utf, vt100; compact, inverted, notrunc;\n" "Tree specific options are: ascii, utf, vt100; compact, inverted, notrunc;\n"
" blkdevname, [no]device, active, open, rw and uuid.\n"); " blkdevname, [no]device, active, open, rw and uuid.\n\n");
putc('\n', out);
} }
static void _losetup_usage(FILE *out) static void _losetup_usage(FILE *out)
{ {
fprintf(out, "Usage:\n\n"); fprintf(out,
fprintf(out, "%s [-d|-a] [-e encryption] " "Usage:\n\n"
"[-o offset] [-f|loop_device] [file]\n\n", "%s [-d|-a] [-e encryption] "
_base_commands[_base_command].name); "[-o offset] [-f|loop_device] [file]\n\n",
_base_commands[_base_command].name);
} }
static void _usage(FILE *out) static void _usage(FILE *out)