summaryrefslogtreecommitdiffstats
path: root/sys-utils
diff options
context:
space:
mode:
authorRuediger Meier2017-06-25 14:49:47 +0200
committerRuediger Meier2017-06-27 12:28:36 +0200
commitb30544549505019f5fc092c5d99fcb1cae1a44b1 (patch)
treeb22fa305e99ed2bfa3bdeb145e8094874b631754 /sys-utils
parentmisc: introduce print_usage_help_options() (diff)
downloadkernel-qcow2-util-linux-b30544549505019f5fc092c5d99fcb1cae1a44b1.tar.gz
kernel-qcow2-util-linux-b30544549505019f5fc092c5d99fcb1cae1a44b1.tar.xz
kernel-qcow2-util-linux-b30544549505019f5fc092c5d99fcb1cae1a44b1.zip
misc: consolidate all --help option descriptions
Now we are always using the same text also for commands which had still hardcoded descriptions or where we can't use the standard print_usage_help_options macro. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'sys-utils')
-rw-r--r--sys-utils/chcpu.c22
-rw-r--r--sys-utils/dmesg.c2
-rw-r--r--sys-utils/prlimit.c4
3 files changed, 15 insertions, 13 deletions
diff --git a/sys-utils/chcpu.c b/sys-utils/chcpu.c
index c0f568073..620aabfba 100644
--- a/sys-utils/chcpu.c
+++ b/sys-utils/chcpu.c
@@ -242,16 +242,18 @@ static void __attribute__((__noreturn__)) usage(void)
fputs(USAGE_SEPARATOR, out);
fputs(_("Configure CPUs in a multi-processor system.\n"), out);
- puts(_( "\nOptions:\n"
- " -h, --help print this help\n"
- " -e, --enable <cpu-list> enable cpus\n"
- " -d, --disable <cpu-list> disable cpus\n"
- " -c, --configure <cpu-list> configure cpus\n"
- " -g, --deconfigure <cpu-list> deconfigure cpus\n"
- " -p, --dispatch <mode> set dispatching mode\n"
- " -r, --rescan trigger rescan of cpus\n"
- " -V, --version output version information and exit\n"));
-
+ fputs(USAGE_OPTIONS, stdout);
+ fputs(_(
+ " -e, --enable <cpu-list> enable cpus\n"
+ " -d, --disable <cpu-list> disable cpus\n"
+ " -c, --configure <cpu-list> configure cpus\n"
+ " -g, --deconfigure <cpu-list> deconfigure cpus\n"
+ " -p, --dispatch <mode> set dispatching mode\n"
+ " -r, --rescan trigger rescan of cpus\n"
+ ), stdout);
+ print_usage_help_options(31);
+
+ printf(USAGE_MAN_TAIL("chcpu(8)"));
exit(EXIT_SUCCESS);
}
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
index 0db567bfa..ef12567c3 100644
--- a/sys-utils/dmesg.c
+++ b/sys-utils/dmesg.c
@@ -318,7 +318,7 @@ static void __attribute__((__noreturn__)) usage(void)
fprintf(out, " %7s - %s\n",
level_names[i].name,
_(level_names[i].help));
- fputs(USAGE_SEPARATOR, out);
+
fprintf(out, USAGE_MAN_TAIL("dmesg(1)"));
exit(EXIT_SUCCESS);
}
diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c
index 44db54ca5..37e0f9fed 100644
--- a/sys-utils/prlimit.c
+++ b/sys-utils/prlimit.c
@@ -172,8 +172,8 @@ static void __attribute__((__noreturn__)) usage(void)
" --noheadings don't print headings\n"
" --raw use the raw output format\n"
" --verbose verbose output\n"
- " -h, --help display this help and exit\n"
- " -V, --version output version information and exit\n"), out);
+ ), out);
+ print_usage_help_options(24);
fputs(_("\nResources Options:\n"), out);
fputs(_(" -c, --core maximum size of core files created\n"