diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-01-25 09:34:23 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-01-25 09:34:23 +0100 |
commit | a497231f537352c7ff7a80c07ef6191b00e7e30e (patch) | |
tree | eb7ae130c13f7e0f5f764e4b97bf8b275febeb62 | |
parent | d8fd88a0915364c30769ec5c5a6b542517fd55f3 (diff) | |
download | busybox-w32-a497231f537352c7ff7a80c07ef6191b00e7e30e.tar.gz busybox-w32-a497231f537352c7ff7a80c07ef6191b00e7e30e.tar.bz2 busybox-w32-a497231f537352c7ff7a80c07ef6191b00e7e30e.zip |
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.c | 16 |
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 @@ | |||
9 | //config: bool "chrt (4.4 kb)" | 9 | //config: bool "chrt (4.4 kb)" |
10 | //config: default y | 10 | //config: default y |
11 | //config: help | 11 | //config: help |
12 | //config: manipulate real-time attributes of a process. | 12 | //config: Manipulate real-time attributes of a process. |
13 | //config: This requires sched_{g,s}etparam support in your libc. | 13 | //config: This requires sched_{g,s}etparam support in your libc. |
14 | 14 | ||
15 | //applet:IF_CHRT(APPLET_NOEXEC(chrt, chrt, BB_DIR_USR_BIN, BB_SUID_DROP, chrt)) | 15 | //applet:IF_CHRT(APPLET_NOEXEC(chrt, chrt, BB_DIR_USR_BIN, BB_SUID_DROP, chrt)) |
@@ -40,15 +40,15 @@ | |||
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | static const struct { | 42 | static const struct { |
43 | int policy; | ||
44 | char name[sizeof("SCHED_OTHER")]; | 43 | char name[sizeof("SCHED_OTHER")]; |
45 | } policies[] = { | 44 | } policies[] = { |
46 | {SCHED_OTHER, "SCHED_OTHER"}, | 45 | { "SCHED_OTHER" }, /* 0:SCHED_OTHER */ |
47 | {SCHED_FIFO, "SCHED_FIFO"}, | 46 | { "SCHED_FIFO" }, /* 1:SCHED_FIFO */ |
48 | {SCHED_RR, "SCHED_RR"}, | 47 | { "SCHED_RR" }, /* 2:SCHED_RR */ |
49 | {SCHED_BATCH, "SCHED_BATCH"}, | 48 | { "SCHED_BATCH" }, /* 3:SCHED_BATCH */ |
50 | {0 /* unused */, ""}, | 49 | { "" }, /* 4:SCHED_ISO */ |
51 | {SCHED_IDLE, "SCHED_IDLE"} | 50 | { "SCHED_IDLE" }, /* 5:SCHED_IDLE */ |
51 | /* 6:SCHED_DEADLINE */ | ||
52 | }; | 52 | }; |
53 | 53 | ||
54 | static void show_min_max(int pol) | 54 | static void show_min_max(int pol) |