chrt: do not segfault if policy number is unknown
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 5 Apr 2019 10:03:48 +0000 (12:03 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 5 Apr 2019 10:03:48 +0000 (12:03 +0200)
commitae5ca6fc417161eb514103d3c2b38add18012760
tree44f30bb87ef774528e3a00e63afb9da24e554a69
parent29c2dcfe1c934f75c87f5a0bc3bf42b2e73f294c
chrt: do not segfault if policy number is unknown

While at it, improve help text

function                                             old     new   delta
packed_usage                                       33319   33344     +25
policy_name                                            -      22     +22
show_min_max                                          59      64      +5
chrt_main                                            432     429      -3
policies                                              72       -     -72
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/1 up/down: 52/-75)            Total: -23 bytes
   text    data     bss     dec     hex filename
 982150     485    7296  989931   f1aeb busybox_old
 982183     485    7296  989964   f1b0c busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/chrt.c