[git commit] hush: printf builtin with no arguments should not exit
Denys Vlasenko
vda.linux at googlemail.com
Mon Apr 3 17:29:57 UTC 2023
commit: https://git.busybox.net/busybox/commit/?id=ff8fde111e11e973b269467dd86f235a27f653df
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
coreutils/printf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/coreutils/printf.c b/coreutils/printf.c
index 2e672d15f..b89df67f9 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -428,7 +428,7 @@ int printf_main(int argc UNUSED_PARAM, char **argv)
if (argv[1] && argv[1][0] == '-' && argv[1][1] == '-' && !argv[1][2])
argv++;
if (!argv[1]) {
- if (ENABLE_ASH_PRINTF
+ if ((ENABLE_ASH_PRINTF || ENABLE_HUSH_PRINTF)
&& applet_name[0] != 'p'
) {
bb_simple_error_msg("usage: printf FORMAT [ARGUMENT...]");
More information about the busybox-cvs
mailing list