fuser: code shrink, fixing default signal, exitcode and PID display
authorMaksym Kryzhanovskyy <xmaks@email.cz>
Sat, 22 May 2010 18:41:08 +0000 (20:41 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 22 May 2010 18:41:08 +0000 (20:41 +0200)
commitfef9ee70727452954d2c5d28cc65e8b0fffcd6f1
tree93083c2e5b970f9d280ed7d2dc4df1c4cef4c31e
parent8391c4800cda0eda6e64c464cc0ea85d1785a768
fuser: code shrink, fixing default signal, exitcode and PID display

Defult signal is KILL, not TERM.
We used to not display PIDs with -k but without -s, but
upstream (fuser from PSmisc 22.7) still shows PIDs.
Filtering out of our own PID was buggy.

function                                             old     new   delta
fuser_main                                           669     918    +249
search_dev_inode                                      67      74      +7
add_pid                                               38      39      +1
scan_pid_maps                                        225     222      -3
add_inode                                             91      88      -3
packed_usage                                       27047   27039      -8
scan_dir_links                                       102      76     -26
scan_link                                             78      46     -32
file_to_dev_inode                                     64       -     -64
scan_proc_net                                        307       -    -307
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 3/5 up/down: 257/-443)         Total: -186 bytes

Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
include/usage.h
procps/fuser.c