From: Jo-Philipp Wich Date: Fri, 10 Feb 2017 09:02:42 +0000 (+0100) Subject: libopkg: print error messages to stderr X-Git-Url: http://git.openwrt.org/?p=project%2Fopkg-lede.git;a=commitdiff_plain;h=d654a438b6c21f180d81af5b8a06708d8a5db957 libopkg: print error messages to stderr Print the collected error list to stderr isntead of stdout. This is useful for wrapping programs that treat stdout and stderr differently. Signed-off-by: Jo-Philipp Wich --- diff --git a/libopkg/opkg_message.c b/libopkg/opkg_message.c index 7114e3a..2862ea6 100644 --- a/libopkg/opkg_message.c +++ b/libopkg/opkg_message.c @@ -64,10 +64,10 @@ print_error_list(void) struct errlist *err = error_list_head; if (err) { - printf("Collected errors:\n"); + fprintf(stderr, "Collected errors:\n"); /* Here we print the errors collected and free the list */ while (err != NULL) { - printf(" * %s", err->errmsg); + fprintf(stderr, " * %s", err->errmsg); err = err->next; } }