From c9c1a41c581101f53cc36efae53cd8ebb568962f Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 12 Jul 2006 19:17:55 +0000 Subject: A couple things that got tangled up in my tree, easier to check in both than untangle them: Rewrite u_signal_names() into get_signum() and get_signame(), plus trim the signal list to that required by posix (they can specify the numbers for the rest if they really need them). (This is preparatory cleanup for adding a timeout applet like Roberto Foglietta wants.) Export the itoa (added due to Denis Vlasenko, although it's not quite his preferred implementation) from xfuncs.c so it's actually used, and remove several other redundant implementations of itoa and utoa() in the tree. --- procps/fuser.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'procps/fuser.c') diff --git a/procps/fuser.c b/procps/fuser.c index 1a4f612f1..2965fc34b 100644 --- a/procps/fuser.c +++ b/procps/fuser.c @@ -9,18 +9,6 @@ */ #include "busybox.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #define FUSER_PROC_DIR "/proc" #define FUSER_MAX_LINE 255 @@ -335,7 +323,7 @@ int fuser_main(int argc, char **argv) optn = fuser_option(argv[i]); if(optn) opt |= optn; else if(argv[i][0] == '-') { - if(!(u_signal_names(argv[i]+1, &killsig, 0))) + if(0>(killsig = get_signum(argv[i]+1))) killsig = SIGTERM; } else { @@ -345,7 +333,6 @@ int fuser_main(int argc, char **argv) } if(!fnic) return 1; - pids = xmalloc(sizeof(pid_list)); inodes = xmalloc(sizeof(inode_list)); for(i=0;ipid == 0) success = 0; -- cgit v1.2.3