[PATCH] Always print the program name

From: sin <sin_AT_2f30.org>
Date: Thu, 14 Nov 2013 13:06:48 +0000

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
_AT_@ -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);
 
_AT_@ -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);
-- 
1.8.3.4
--VbJkn9YxBvnuCH5J--
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Thu Nov 14 2013 - 14:12:07 CET