aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2025-08-09 17:04:16 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2025-08-09 17:04:16 +0200
commit53b3854e8141f4fc5fad10f180fc4fac2feee954 (patch)
treec863a4b479c1a520dcf50fa067b5101ee26000d9 /shell
parentc92755133b310461171cd6050237caba6dce1264 (diff)
downloadbusybox-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.c13
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)
1445static void 1445static void
1446ash_vmsg(const char *msg, va_list ap) 1446ash_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}