From 3147039a65275662aaf713079cd11209374fd9cd Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 5 Jan 2008 06:03:12 +0000 Subject: michael_d writes in #1869: make sure GNU error functions output 'program: ' as documented in the function api --- libc/misc/error/error.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libc/misc/error') 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); -- cgit v1.2.3