aboutsummaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
Diffstat (limited to 'applets')
-rw-r--r--applets/busybox.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/applets/busybox.c b/applets/busybox.c
index f0258c36e..0892e84ec 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -199,12 +199,7 @@ int busybox_main(int argc, char **argv)
199 argc--; 199 argc--;
200 argv++; 200 argv++;
201 201
202 /* If we've already been here once, exit now */ 202 if (been_there_done_that == 1 || argc < 1) {
203 if (been_there_done_that == 1)
204 return -1;
205 been_there_done_that = 1;
206
207 if (argc < 1) {
208 const struct Applet *a = applets; 203 const struct Applet *a = applets;
209 fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n", 204 fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n",
210 BB_VER, BB_BT); 205 BB_VER, BB_BT);
@@ -224,6 +219,9 @@ int busybox_main(int argc, char **argv)
224 } 219 }
225 fprintf(stderr, "\n\n"); 220 fprintf(stderr, "\n\n");
226 exit(-1); 221 exit(-1);
227 } else 222 } else {
223 /* If we've already been here once, exit now */
224 been_there_done_that = 1;
228 return (main(argc, argv)); 225 return (main(argc, argv));
226 }
229} 227}