diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2025-08-09 17:04:16 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2025-08-09 17:04:16 +0200 |
| commit | 53b3854e8141f4fc5fad10f180fc4fac2feee954 (patch) | |
| tree | c863a4b479c1a520dcf50fa067b5101ee26000d9 /shell | |
| parent | c92755133b310461171cd6050237caba6dce1264 (diff) | |
| download | busybox-w32-53b3854e8141f4fc5fad10f180fc4fac2feee954.tar.gz busybox-w32-53b3854e8141f4fc5fad10f180fc4fac2feee954.tar.bz2 busybox-w32-53b3854e8141f4fc5fad10f180fc4fac2feee954.zip | |
ash: fix fallout of no-more-set commandname
Testsuite reports lots of message mismatches, fix that
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/shell/ash.c b/shell/ash.c index f1339cf3c..3e393715b 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -1445,13 +1445,14 @@ showtree(union node *n) | |||
| 1445 | static void | 1445 | static void |
| 1446 | ash_vmsg(const char *msg, va_list ap) | 1446 | ash_vmsg(const char *msg, va_list ap) |
| 1447 | { | 1447 | { |
| 1448 | //In dash, the order/format is different: | ||
| 1449 | // arg0: LINENO: [commandname:] MSG | ||
| 1450 | //If you fix it, change testsuite to match | ||
| 1448 | fprintf(stderr, "%s: ", arg0); | 1451 | fprintf(stderr, "%s: ", arg0); |
| 1449 | if (commandname) { | 1452 | if (commandname && strcmp(arg0, commandname) != 0) |
| 1450 | if (strcmp(arg0, commandname) != 0) | 1453 | fprintf(stderr, "%s: ", commandname); |
| 1451 | fprintf(stderr, "%s: ", commandname); | 1454 | if (!iflag || g_parsefile->pf_fd > 0) |
| 1452 | if (!iflag || g_parsefile->pf_fd > 0) | 1455 | fprintf(stderr, "line %d: ", errlinno); |
| 1453 | fprintf(stderr, "line %d: ", errlinno); | ||
| 1454 | } | ||
| 1455 | vfprintf(stderr, msg, ap); | 1456 | vfprintf(stderr, msg, ap); |
| 1456 | newline_and_flush(stderr); | 1457 | newline_and_flush(stderr); |
| 1457 | } | 1458 | } |
