From aaf6349f7ff167d66d748d51184695b0c65a4c22 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 14 Jun 2010 20:03:21 +0200 Subject: [PATCH] chrt: slice help text into manageable chunks for translators [kzak@redhat.com: - clean up usage() function] Signed-off-by: Benno Schulenberg Signed-off-by: Karel Zak --- schedutils/chrt.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/schedutils/chrt.c b/schedutils/chrt.c index 8044d39c..2d0254fa 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] { | [ ...]}\n" "\nGet policy:\n" - " chrt [options] { | [ ...]}\n\n" + " chrt [options] { | [ ...]}\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")); -- 2.39.5