summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-01-25 09:34:23 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-01-25 09:34:23 +0100
commita497231f537352c7ff7a80c07ef6191b00e7e30e (patch)
treeeb7ae130c13f7e0f5f764e4b97bf8b275febeb62
parentd8fd88a0915364c30769ec5c5a6b542517fd55f3 (diff)
chrt: code shrink
function old new delta show_min_max 60 59 -1 policies 96 72 -24 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--util-linux/chrt.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/util-linux/chrt.c b/util-linux/chrt.c
index 27c8f43cc..45459d940 100644
--- a/util-linux/chrt.c
+++ b/util-linux/chrt.c
@@ -9,7 +9,7 @@
//config: bool "chrt (4.4 kb)"
//config: default y
//config: help
-//config: manipulate real-time attributes of a process.
+//config: Manipulate real-time attributes of a process.
//config: This requires sched_{g,s}etparam support in your libc.
//applet:IF_CHRT(APPLET_NOEXEC(chrt, chrt, BB_DIR_USR_BIN, BB_SUID_DROP, chrt))
@@ -40,15 +40,15 @@
#endif
static const struct {
- int policy;
char name[sizeof("SCHED_OTHER")];
} policies[] = {
- {SCHED_OTHER, "SCHED_OTHER"},
- {SCHED_FIFO, "SCHED_FIFO"},
- {SCHED_RR, "SCHED_RR"},
- {SCHED_BATCH, "SCHED_BATCH"},
- {0 /* unused */, ""},
- {SCHED_IDLE, "SCHED_IDLE"}
+ { "SCHED_OTHER" }, /* 0:SCHED_OTHER */
+ { "SCHED_FIFO" }, /* 1:SCHED_FIFO */
+ { "SCHED_RR" }, /* 2:SCHED_RR */
+ { "SCHED_BATCH" }, /* 3:SCHED_BATCH */
+ { "" }, /* 4:SCHED_ISO */
+ { "SCHED_IDLE" }, /* 5:SCHED_IDLE */
+ /* 6:SCHED_DEADLINE */
};
static void show_min_max(int pol)