[git commit] Allow "busybox <applet>" to work when busybox is disabled

Denys Vlasenko vda.linux at googlemail.com
Sat Jun 18 17:15:20 UTC 2016

commit: https://git.busybox.net/busybox/commit/?id=ba12081a9e9b2d90d1924546bc9097abf52cf2b5
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

A recent commit made it possible to disable BusyBox's --install
and --list options.  However it also stopped "busybox <applet>
<params>" from working.

Signed-off-by: Ron Yorston <rmy at pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
 libbb/appletlib.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 281123c..b6fe1da 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -956,6 +956,10 @@ int main(int argc UNUSED_PARAM, char **argv)
 	lbb_prepare("busybox" IF_FEATURE_INDIVIDUAL(, argv));
+	if (argv[1] && is_prefixed_with(bb_basename(argv[0]), "busybox"))
+		argv++;
 	applet_name = argv[0];
 	if (applet_name[0] == '-')

More information about the busybox-cvs mailing list