From 80593c47fce8bfe3dbc9d7b3d258edad2ab0a7ae Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 23 Jul 2012 19:56:03 +0000 Subject: [PATCH] Move opt_quiet check to my_log_curses, so it works for curses-less builds --- cgminer.c | 5 +---- logging.c | 3 +++ miner.h | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cgminer.c b/cgminer.c index ea540815..6d95df92 100644 --- a/cgminer.c +++ b/cgminer.c @@ -87,7 +87,7 @@ static bool opt_benchmark; static bool have_longpoll; static bool want_per_device_stats; bool use_syslog; -static bool opt_quiet; +bool opt_quiet; static bool opt_realquiet; bool opt_loginput; const int opt_cutofftemp = 95; @@ -1566,9 +1566,6 @@ void log_curses(int prio, const char *f, va_list ap) { bool high_prio; - if (opt_quiet && prio != LOG_ERR) - return; - high_prio = (prio == LOG_WARNING || prio == LOG_ERR); if (curses_active_locked()) { diff --git a/logging.c b/logging.c index fb3868fa..db623748 100644 --- a/logging.c +++ b/logging.c @@ -20,6 +20,9 @@ int opt_log_level = LOG_NOTICE; static void my_log_curses(__maybe_unused int prio, char *f, va_list ap) { + if (opt_quiet && prio != LOG_ERR) + return; + #ifdef HAVE_CURSES extern bool use_curses; if (use_curses) diff --git a/miner.h b/miner.h index 120d7633..76689c03 100644 --- a/miner.h +++ b/miner.h @@ -614,6 +614,7 @@ extern int opt_n_threads; extern int num_processors; extern int hw_errors; extern bool use_syslog; +extern bool opt_quiet; extern struct thr_info *thr_info; extern struct cgpu_info gpus[MAX_GPUDEVICES]; extern int gpu_threads;