Restore --help handling I mistakenly removed.
This commit is contained in:
parent
a0428eee9e
commit
2dab174daa
@ -144,8 +144,11 @@ int main(int argc, char **argv)
|
|||||||
search_applet.name = applet_name;
|
search_applet.name = applet_name;
|
||||||
applet = bsearch(&search_applet, applets, NUM_APPLETS,
|
applet = bsearch(&search_applet, applets, NUM_APPLETS,
|
||||||
sizeof(struct BB_applet), applet_name_compare);
|
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));
|
exit((*(applet->main)) (argc, argv));
|
||||||
|
}
|
||||||
|
|
||||||
return(busybox_main(argc, argv));
|
return(busybox_main(argc, argv));
|
||||||
}
|
}
|
||||||
|
@ -144,8 +144,11 @@ int main(int argc, char **argv)
|
|||||||
search_applet.name = applet_name;
|
search_applet.name = applet_name;
|
||||||
applet = bsearch(&search_applet, applets, NUM_APPLETS,
|
applet = bsearch(&search_applet, applets, NUM_APPLETS,
|
||||||
sizeof(struct BB_applet), applet_name_compare);
|
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));
|
exit((*(applet->main)) (argc, argv));
|
||||||
|
}
|
||||||
|
|
||||||
return(busybox_main(argc, argv));
|
return(busybox_main(argc, argv));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user