diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-01-05 06:03:12 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-01-05 06:03:12 +0000 |
commit | 3147039a65275662aaf713079cd11209374fd9cd (patch) | |
tree | 17a51d370a30a537cf1ca2334f2e9014cdde1f58 | |
parent | e6e3f570fa7dcd16eadc2cf51247ab91bc2aa9fe (diff) |
michael_d writes in #1869: make sure GNU error functions output 'program: ' as documented in the function api
-rw-r--r-- | libc/misc/error/error.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/misc/error/error.c b/libc/misc/error/error.c index 08044ac83..02b4e8e69 100644 --- a/libc/misc/error/error.c +++ b/libc/misc/error/error.c @@ -53,6 +53,8 @@ void __error (int status, int errnum, const char *message, ...) fflush (stdout); + fprintf (stderr, "%s: ", __uclibc_progname); + va_start (args, message); vfprintf (stderr, message, args); va_end (args); @@ -87,6 +89,8 @@ void __error_at_line (int status, int errnum, const char *file_name, fflush (stdout); + fprintf (stderr, "%s:", __uclibc_progname); + if (file_name != NULL) fprintf (stderr, "%s:%d: ", file_name, line_number); |