--- libbb/appletlib.c +++ libbb/appletlib.c @@ -175,11 +175,19 @@ xfunc_die(); } -int FAST_FUNC find_applet_by_name(const char *name) +int FAST_FUNC find_applet_by_name(const char *original_name) { unsigned i, max; int j; const char *p; + const char *name = original_name; + + char unaliased_name[MAX_APPLET_NAME_LEN + 1] = { 0 }; + char *suffix = is_suffixed_with(name, "-busybox"); + if (suffix) { + strncpy(unaliased_name, name, suffix - name); + name = unaliased_name; + } /* The commented-out word-at-a-time code is ~40% faster, but +160 bytes. * "Faster" here saves ~0.5 microsecond of real time - not worth it.