diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-31 03:36:02 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-31 03:36:02 +0000 |
| commit | 9b8f810d38a720bca94af864e2960de91aae3a29 (patch) | |
| tree | 10732e1683a0bd01ff263625e1a677b4c0974be2 /coreutils/printf.c | |
| parent | 9343da45d3f226cc8b45879ac8dbacac2911cdd8 (diff) | |
Apply post 1.12.3 fixes, bump to 1.12.41_12_41_12_stable
Diffstat (limited to 'coreutils/printf.c')
| -rw-r--r-- | coreutils/printf.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/coreutils/printf.c b/coreutils/printf.c index 76524f706..b0a48cda4 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c @@ -359,8 +359,15 @@ int printf_main(int argc UNUSED_PARAM, char **argv) * We will mimic coreutils. */ if (argv[1] && argv[1][0] == '-' && argv[1][1] == '-' && !argv[1][2]) argv++; - if (!argv[1]) + if (!argv[1]) { + if (ENABLE_ASH_BUILTIN_PRINTF + && applet_name[0] != 'p' + ) { + bb_error_msg("usage: printf FORMAT [ARGUMENT...]"); + return 2; /* bash compat */ + } bb_show_usage(); + } format = argv[1]; argv2 = argv + 2; |
