diff options
author | Karel Zak | 2017-10-18 12:02:05 +0200 |
---|---|---|
committer | Karel Zak | 2017-10-20 12:37:04 +0200 |
commit | 96b6448d5d36e6b0dd723d811c52db45a76e2756 (patch) | |
tree | cc2e14410ebfc2ae6459fbd59d1675bd140596a1 /sys-utils/chmem.c | |
parent | lsmem/chmem: add memory zone awareness to bash-completion (diff) | |
download | kernel-qcow2-util-linux-96b6448d5d36e6b0dd723d811c52db45a76e2756.tar.gz kernel-qcow2-util-linux-96b6448d5d36e6b0dd723d811c52db45a76e2756.tar.xz kernel-qcow2-util-linux-96b6448d5d36e6b0dd723d811c52db45a76e2756.zip |
chmem: cleanup usage()
Just to be compatible with another u-l tools.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/chmem.c')
-rw-r--r-- | sys-utils/chmem.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/sys-utils/chmem.c b/sys-utils/chmem.c index 2f0680de8..8d8e395ea 100644 --- a/sys-utils/chmem.c +++ b/sys-utils/chmem.c @@ -328,7 +328,7 @@ static void parse_parameter(struct chmem_desc *desc, char *param) static void __attribute__((__noreturn__)) usage(void) { FILE *out = stdout; - unsigned int i; + size_t i; fputs(USAGE_HEADER, out); fprintf(out, _(" %s [options] [SIZE|RANGE|BLOCKRANGE]\n"), program_invocation_short_name); @@ -337,20 +337,16 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Set a particular size or range of memory online or offline.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(_(" -e, --enable enable memory\n"), out); - fputs(_(" -d, --disable disable memory\n"), out); - fputs(_(" -b, --blocks use memory blocks\n"), out); - fputs(_(" -z, --zone select memory zone ("), out); - for (i = 0; i < ARRAY_SIZE(zone_names); i++) { - fputs(zone_names[i], out); - if (i < ARRAY_SIZE(zone_names) - 1) - fputc('|', out); - } - fputs(")\n", out); - - fputs(_(" -v, --verbose verbose output\n"), out); - fputs(USAGE_SEPARATOR, out); - printf(USAGE_HELP_OPTIONS(16)); + fputs(_(" -e, --enable enable memory\n"), out); + fputs(_(" -d, --disable disable memory\n"), out); + fputs(_(" -b, --blocks use memory blocks\n"), out); + fputs(_(" -z, --zone <name> select memory zone (see below)\n"), out); + fputs(_(" -v, --verbose verbose output\n"), out); + printf(USAGE_HELP_OPTIONS(20)); + + fputs(_("\nSupported zones:\n"), out); + for (i = 0; i < ARRAY_SIZE(zone_names); i++) + fprintf(out, " %s\n", zone_names[i]); printf(USAGE_MAN_TAIL("chmem(8)")); |