From d654a438b6c21f180d81af5b8a06708d8a5db957 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 10 Feb 2017 10:02:42 +0100 Subject: [PATCH] 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 --- libopkg/opkg_message.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } } -- 2.30.2