From 3c6d1b9bb2dd226d0ce91bd4cd6ae7eca15e387a Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Sun, 4 Jun 2023 07:14:49 +0200 Subject: conf, log: On -h / --help, print usage to stdout, not stderr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Erik suggests that this makes it easier to grep for options, and with --help we're anyway printing usage information as expected, not as part of an error report. While at it: on -h, we should exit with 0. Reported-by: Erik Sjölund Link: https://bugs.passt.top/show_bug.cgi?id=52 Link: https://bugs.passt.top/show_bug.cgi?id=53 Signed-off-by: Stefano Brivio Reviewed-by: David Gibson --- log.h | 1 + 1 file changed, 1 insertion(+) (limited to 'log.h') diff --git a/log.h b/log.h index 3aab29d..a17171a 100644 --- a/log.h +++ b/log.h @@ -22,6 +22,7 @@ void debug(const char *format, ...); } while (0) extern int log_trace; +extern int log_to_stdout; void trace_init(int enable); #define trace(...) \ do { \ -- cgit v1.2.3