]> err.no Git - util-linux/commitdiff
chrt: slice help text into manageable chunks for translators
authorBenno Schulenberg <bensberg@justemail.net>
Mon, 14 Jun 2010 18:03:21 +0000 (20:03 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 15 Jun 2010 10:31:21 +0000 (12:31 +0200)
[kzak@redhat.com: - clean up usage() function]

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
schedutils/chrt.c

index 8044d39ce7224b9ff75e675fe48b696312bc0244..2d0254fa997c3fa778bc4c5ff5391a3b37891711 100644 (file)
 
 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"));