projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Patch from Bernhard Fischer to make a bunch of symbols static
[oweals/busybox.git]
/
procps
/
kill.c
diff --git
a/procps/kill.c
b/procps/kill.c
index f11623e0119d13a7bed1501eebd3ae7ba3faffe7..25a8d012467ac86cde9c236bf07ee4078663c6c3 100644
(file)
--- a/
procps/kill.c
+++ b/
procps/kill.c
@@
-3,7
+3,7
@@
* Mini kill/killall implementation for busybox
*
* Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>.
* Mini kill/killall implementation for busybox
*
* Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>.
- * Copyright (C) 1999-200
3
by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 1999-200
4
by Erik Andersen <andersen@codepoet.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-32,18
+32,19
@@
#include <unistd.h>
#include "busybox.h"
#include <unistd.h>
#include "busybox.h"
-static const int KILL = 0;
-static const int KILLALL = 1;
+#define KILL 0
+#define KILLALL 1
extern int kill_main(int argc, char **argv)
{
extern int kill_main(int argc, char **argv)
{
- int whichApp, signo = SIGTERM
, quiet = 0
;
+ int whichApp, signo = SIGTERM;
const char *name;
int errors = 0;
#ifdef CONFIG_KILLALL
const char *name;
int errors = 0;
#ifdef CONFIG_KILLALL
+ int quiet=0;
/* Figure out what we are trying to do here */
/* Figure out what we are trying to do here */
- whichApp = (strcmp(bb_applet_name, "killall") == 0)? KILLALL : KILL;
+ whichApp = (strcmp(bb_applet_name, "killall") == 0)? KILLALL : KILL;
#else
whichApp = KILL;
#endif
#else
whichApp = KILL;
#endif
@@
-86,15
+87,17
@@
extern int kill_main(int argc, char **argv)
return EXIT_SUCCESS;
}
return EXIT_SUCCESS;
}
+#ifdef CONFIG_KILLALL
/* The -q quiet option */
if(argv[1][1]=='q' && argv[1][2]=='\0'){
quiet++;
argv++;
argc--;
/* The -q quiet option */
if(argv[1][1]=='q' && argv[1][2]=='\0'){
quiet++;
argv++;
argc--;
- if(argv[1][0] != '-'){
+ if(arg
c<2 || arg
v[1][0] != '-'){
goto do_it_now;
}
}
goto do_it_now;
}
}
+#endif
if(!u_signal_names(argv[1]+1, &signo, 0))
bb_error_msg_and_die( "bad signal name '%s'", argv[1]+1);
if(!u_signal_names(argv[1]+1, &signo, 0))
bb_error_msg_and_die( "bad signal name '%s'", argv[1]+1);
@@
-118,7
+121,7
@@
do_it_now:
argv++;
}
argv++;
}
- }
+ }
#ifdef CONFIG_KILLALL
else {
pid_t myPid=getpid();
#ifdef CONFIG_KILLALL
else {
pid_t myPid=getpid();