From 078fce3f77ff56dfd7d8824333302b9f435ec717 Mon Sep 17 00:00:00 2001 From: sin Date: Thu, 14 Nov 2013 13:06:48 +0000 Subject: [PATCH] Always print the program name This is generally very useful for sbase, especially when we hit some case that is not implemented and we want to know which program failed. --- util/eprintf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/eprintf.c b/util/eprintf.c index 4b12902..c878e81 100644 --- a/util/eprintf.c +++ b/util/eprintf.c @@ -33,7 +33,7 @@ enprintf(int status, const char *fmt, ...) void venprintf(int status, const char *fmt, va_list ap) { - /*fprintf(stderr, "%s: ", argv0);*/ + fprintf(stderr, "%s: ", argv0); vfprintf(stderr, fmt, ap); @@ -50,6 +50,8 @@ weprintf(const char *fmt, ...) { va_list ap; + fprintf(stderr, "%s: ", argv0); + va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap);