mirror of
https://git.busybox.net/busybox
synced 2026-01-31 16:43:21 +00:00
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>
This commit is contained in:
parent
c92755133b
commit
53b3854e81
1 changed files with 7 additions and 6 deletions
13
shell/ash.c
13
shell/ash.c
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue