hush: printf builtin with no arguments should not exit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
90f5f2a190
commit
515adcc9f3
@ -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...]");
|
||||
|
Loading…
Reference in New Issue
Block a user