summaryrefslogtreecommitdiffstats
path: root/schedutils/chrt.c
diff options
context:
space:
mode:
authorBenno Schulenberg2010-06-14 20:03:21 +0200
committerKarel Zak2010-06-15 12:31:21 +0200
commitaaf6349f7ff167d66d748d51184695b0c65a4c22 (patch)
tree1c2a7b8851d9d0ea69f8e9abb4bf75f5d694a6f8 /schedutils/chrt.c
parentchrt: change two messages into four translatable sentences (diff)
downloadkernel-qcow2-util-linux-aaf6349f7ff167d66d748d51184695b0c65a4c22.tar.gz
kernel-qcow2-util-linux-aaf6349f7ff167d66d748d51184695b0c65a4c22.tar.xz
kernel-qcow2-util-linux-aaf6349f7ff167d66d748d51184695b0c65a4c22.zip
chrt: slice help text into manageable chunks for translators
[kzak@redhat.com: - clean up usage() function] Signed-off-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'schedutils/chrt.c')
-rw-r--r--schedutils/chrt.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/schedutils/chrt.c b/schedutils/chrt.c
index 8044d39ce..2d0254fa9 100644
--- a/schedutils/chrt.c
+++ b/schedutils/chrt.c
@@ -54,26 +54,33 @@
static void show_usage(int rc)
{
- fprintf(stdout, _(
- "\nchrt - manipulate real-time attributes of a process.\n"
+ FILE *out = rc == EXIT_SUCCESS ? stdout : stderr;
+
+ fprintf(out, _(
+ "\nchrt - manipulate real-time attributes of a process\n"
"\nSet policy:\n"
" chrt [options] <policy> <priority> {<pid> | <command> [<arg> ...]}\n"
"\nGet policy:\n"
- " chrt [options] {<pid> | <command> [<arg> ...]}\n\n"
+ " chrt [options] {<pid> | <command> [<arg> ...]}\n"));
+
+ fprintf(out, _(
"\nScheduling policies:\n"
" -b | --batch set policy to SCHED_BATCH\n"
" -f | --fifo set policy to SCHED_FIFO\n"
" -i | --idle set policy to SCHED_IDLE\n"
" -o | --other set policy to SCHED_OTHER\n"
- " -r | --rr set policy to SCHED_RR (default)\n"
+ " -r | --rr set policy to SCHED_RR (default)\n"));
+
#ifdef SCHED_RESET_ON_FORK
+ fprintf(out, _(
"\nScheduling flags:\n"
- " -R | --reset-on-fork set SCHED_RESET_ON_FORK for FIFO or RR\n"
+ " -R | --reset-on-fork set SCHED_RESET_ON_FORK for FIFO or RR\n"));
#endif
+ fprintf(out, _(
"\nOptions:\n"
" -h | --help display this help\n"
- " -p | --pid operate on existing given pid\n"
" -m | --max show min and max valid priorities\n"
+ " -p | --pid operate on existing given pid\n"
" -v | --verbose display status information\n"
" -V | --version output version information\n\n"));