aboutsummaryrefslogtreecommitdiff
path: root/busybox.c
diff options
context:
space:
mode:
Diffstat (limited to 'busybox.c')
-rw-r--r--busybox.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/busybox.c b/busybox.c
index 985798ed6..d356e4cae 100644
--- a/busybox.c
+++ b/busybox.c
@@ -144,8 +144,11 @@ int main(int argc, char **argv)
search_applet.name = applet_name;
applet = bsearch(&search_applet, applets, NUM_APPLETS,
sizeof(struct BB_applet), applet_name_compare);
- if (applet != NULL)
+ if (applet != NULL) {
+ if (applet->usage && argv[1] && strcmp(argv[1], "--help") == 0)
+ usage(applet->usage);
exit((*(applet->main)) (argc, argv));
+ }
return(busybox_main(argc, argv));
}