[git commit] main: !CONFIG_BUSYBOX: "busybox --OPT" is not a call to applet "-OPT"

Denys Vlasenko vda.linux at googlemail.com
Sun Feb 8 10:45:57 UTC 2026


commit: https://git.busybox.net/busybox/commit/?id=8424dc436a66a224b73429675a481d074fc2f8dc
branch: https://git.busybox.net/busybox/log/?h=master

This was confusing:

$ busybox --help
-help: applet not found

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

diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 17216baab..403f5614f 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -1111,8 +1111,11 @@ int main(int argc UNUSED_PARAM, char **argv)
 
 	lbb_prepare("busybox" IF_FEATURE_INDIVIDUAL(, argv));
 # if !ENABLE_BUSYBOX
-	if (argv[1] && is_prefixed_with(bb_basename(argv[0]), "busybox"))
+	if (argv[1] && argv[1][0] != '-' /* do not match "busybox --OPT" */
+	 && is_prefixed_with(bb_basename(argv[0]), "busybox")
+	) {
 		argv++;
+	}
 # endif
 	applet_name = argv[0];
 	if (applet_name[0] == '-')


More information about the busybox-cvs mailing list