From fafeab43932d054c05f63feb9f8bf2ef33f292f7 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sat, 22 Nov 2014 23:28:41 +0000 Subject: sh: Prepend "$0: " to error messages if there is no command name. --- bin/sh/error.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bin/sh/error.c') diff --git a/bin/sh/error.c b/bin/sh/error.c index c76a9dc65768..96a0092d5bb0 100644 --- a/bin/sh/error.c +++ b/bin/sh/error.c @@ -139,6 +139,8 @@ vwarning(const char *msg, va_list ap) { if (commandname) outfmt(out2, "%s: ", commandname); + else if (arg0) + outfmt(out2, "%s: ", arg0); doformat(out2, msg, ap); out2fmt_flush("\n"); } -- cgit v1.2.3