diff options
author | Matt Kraai | 2000-10-25 19:05:38 +0000 |
---|---|---|
committer | Matt Kraai | 2000-10-25 19:05:38 +0000 |
commit | 2dab174daa01952147322197f7c1821217c5e7c5 (patch) | |
tree | 73b29863171b53b0049a2fe8e8a87193a1cdfcd3 /applets/busybox.c | |
parent | a0428eee9e0e5422fae9572d9dbafe7a9f81f485 (diff) | |
download | busybox-2dab174daa01952147322197f7c1821217c5e7c5.zip busybox-2dab174daa01952147322197f7c1821217c5e7c5.tar.gz |
Restore --help handling I mistakenly removed.
Diffstat (limited to 'applets/busybox.c')
-rw-r--r-- | applets/busybox.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/applets/busybox.c b/applets/busybox.c index 985798e..d356e4c 100644 --- a/applets/busybox.c +++ b/applets/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)); } |