← Commit list

53b3854e8

Denys Vlasenko
Denys Vlasenko
2025-08-09
SUCCESS Duration: 168s

Subject

ash: fix fallout of no-more-set commandname

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash.c+7 -6
@@ -1445,13 +1445,14 @@ showtree(union node *n)
static void
ash_vmsg(const char *msg, va_list ap)
{
+//In dash, the order/format is different:
+// arg0: LINENO: [commandname:] MSG
+//If you fix it, change testsuite to match
fprintf(stderr, "%s: ", arg0);
- if (commandname) {
- if (strcmp(arg0, commandname) != 0)
- fprintf(stderr, "%s: ", commandname);
- if (!iflag || g_parsefile->pf_fd > 0)
- fprintf(stderr, "line %d: ", errlinno);
- }
+ if (commandname && strcmp(arg0, commandname) != 0)
+ fprintf(stderr, "%s: ", commandname);
+ if (!iflag || g_parsefile->pf_fd > 0)
+ fprintf(stderr, "line %d: ", errlinno);
vfprintf(stderr, msg, ap);
newline_and_flush(stderr);
}