Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2023-04-03 20:29:57 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2023-04-25 17:47:22 +0300
commit515adcc9f3eb437400c08c24e0f19b149aed7f06 (patch)
treebc8317220af6ecc532589352c35249ae6bde73bc
parent90f5f2a190bca489fac513a150ffab79c6f585b2 (diff)
hush: printf builtin with no arguments should not exit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/printf.c2
1 files changed, 1 insertions, 1 deletions
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...]");