diff options
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 | } |
