[PATCH] busybox: Disable `which` command
Paul Spooren
mail at aparcar.org
Sun Aug 9 20:15:14 EDT 2020
The `which` command returns the first found path to a binary specified.
It's behaviour is identical to the shell built in `command -v`.
Shellcheck even prints a warning if `which` is used (SC2230).
Once neither `openwrt.git` nor related repositories make use of `which`,
the command should be disabled for busybox, freeing roughly 4kB.
Signed-off-by: Paul Spooren <mail at aparcar.org>
---
This patch depends on the following three patches:
openwrt.git: https://patchwork.ozlabs.org/project/openwrt/list/?series=194732
packages.git: https://github.com/openwrt/packages/pull/13059
luci.git: https://github.com/openwrt/luci/pull/4342
package/utils/busybox/Config-defaults.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in
index 29724041f4..2944369a69 100644
--- a/package/utils/busybox/Config-defaults.in
+++ b/package/utils/busybox/Config-defaults.in
@@ -997,7 +997,7 @@ config BUSYBOX_DEFAULT_FEATURE_START_STOP_DAEMON_FANCY
default n
config BUSYBOX_DEFAULT_WHICH
bool
- default y
+ default n
config BUSYBOX_DEFAULT_MINIPS
bool
default n
--
2.25.1
More information about the openwrt-devel
mailing list