aboutsummaryrefslogtreecommitdiff
path: root/kill.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-02-14 21:23:06 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-02-14 21:23:06 +0000
commite171a359ad2de7143fd6ad25bed00304af1094ec (patch)
treea0b652f3dc794d1050c1a8de3afb014a621238fa /kill.c
parent76ed9456991d2fbfcb6348953a579ee8fce06f1b (diff)
downloadbusybox-w32-e171a359ad2de7143fd6ad25bed00304af1094ec.tar.gz
busybox-w32-e171a359ad2de7143fd6ad25bed00304af1094ec.tar.bz2
busybox-w32-e171a359ad2de7143fd6ad25bed00304af1094ec.zip
This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make usage messages occupy less space and simplify how usage messages are displayed. git-svn-id: svn://busybox.net/trunk/busybox@1805 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'kill.c')
-rw-r--r--kill.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/kill.c b/kill.c
index 00a4d5c40..bdd22b52d 100644
--- a/kill.c
+++ b/kill.c
@@ -124,22 +124,19 @@ const struct signal_name signames[] = {
124extern int kill_main(int argc, char **argv) 124extern int kill_main(int argc, char **argv)
125{ 125{
126 int whichApp, sig = SIGTERM; 126 int whichApp, sig = SIGTERM;
127 const char *appUsage;
128 127
129#ifdef BB_KILLALL 128#ifdef BB_KILLALL
130 /* Figure out what we are trying to do here */ 129 /* Figure out what we are trying to do here */
131 whichApp = (strcmp(applet_name, "killall") == 0)? KILLALL : KILL; 130 whichApp = (strcmp(applet_name, "killall") == 0)? KILLALL : KILL;
132 appUsage = (whichApp == KILLALL)? killall_usage : kill_usage;
133#else 131#else
134 whichApp = KILL; 132 whichApp = KILL;
135 appUsage = kill_usage;
136#endif 133#endif
137 134
138 argc--; 135 argc--;
139 argv++; 136 argv++;
140 /* Parse any options */ 137 /* Parse any options */
141 if (argc < 1) 138 if (argc < 1)
142 usage(appUsage); 139 show_usage();
143 140
144 while (argc > 0 && **argv == '-') { 141 while (argc > 0 && **argv == '-') {
145 while (*++(*argv)) { 142 while (*++(*argv)) {
@@ -163,7 +160,7 @@ extern int kill_main(int argc, char **argv)
163 } 160 }
164 break; 161 break;
165 case '-': 162 case '-':
166 usage(appUsage); 163 show_usage();
167 default: 164 default:
168 { 165 {
169 if (isdigit(**argv)) { 166 if (isdigit(**argv)) {