diff options
-rw-r--r-- | src/tbm_bufmgr.c | 6 | ||||
-rw-r--r-- | src/tbm_bufmgr_int.h | 2 | ||||
-rw-r--r-- | src/tbm_log.c | 11 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/tbm_bufmgr.c b/src/tbm_bufmgr.c index 282bc8f..c478cde 100644 --- a/src/tbm_bufmgr.c +++ b/src/tbm_bufmgr.c @@ -40,10 +40,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. int trace_mask = 0; -#ifdef HAVE_DLOG -int bDlog; -#endif - tbm_bufmgr gBufMgr; int b_dump_queue; @@ -229,8 +225,6 @@ _tbm_bufmgr_init(int fd, int server) gettimeofday(&start_tv, NULL); #endif - bDlog = 1; - /* LCOV_EXCL_START */ #ifdef TRACE env = getenv("TBM_TRACE"); diff --git a/src/tbm_bufmgr_int.h b/src/tbm_bufmgr_int.h index 91f411e..07e86a4 100644 --- a/src/tbm_bufmgr_int.h +++ b/src/tbm_bufmgr_int.h @@ -48,7 +48,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <errno.h> #include <assert.h> #include <pthread.h> +#if ENABLE_DLOG #include <dlog.h> +#endif #include <tbm_bufmgr.h> #include <tbm_bo.h> #include <tbm_surface.h> diff --git a/src/tbm_log.c b/src/tbm_log.c index 599d883..7b104e3 100644 --- a/src/tbm_log.c +++ b/src/tbm_log.c @@ -35,7 +35,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "tbm_bufmgr_int.h" #include "tbm_log.h" -#include <dlog.h> #define TBM_PATH_LEN 1024 @@ -48,8 +47,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define LOG_TAG "TBM" #if ENABLE_DLOG +#include <dlog.h> static unsigned int dlog_enable = 1; #else +#include <stdarg.h> static unsigned int dlog_enable = 0; #endif static unsigned int color_enable = 1; @@ -165,6 +166,7 @@ tbm_log_print_stdout(int level, const char *fmt, ...) va_end(arg); } +#if ENABLE_DLOG static void _tbm_log_dlog_print(int level, const char *fmt, va_list arg) { @@ -188,6 +190,7 @@ _tbm_log_dlog_print(int level, const char *fmt, va_list arg) } __dlog_vprint(LOG_ID_SYSTEM, dlog_prio, LOG_TAG, fmt, arg); } +#endif void tbm_log_print(int level, const char *fmt, ...) @@ -202,11 +205,15 @@ tbm_log_print(int level, const char *fmt, ...) if (level > tbm_log_debug_level) return; +#if ENABLE_DLOG if (dlog_enable) { va_start(arg, fmt); _tbm_log_dlog_print(level, fmt, arg); va_end(arg); - } else { + } + else +#endif + { va_start(arg, fmt); _tbm_log_vprint_stdout(level, fmt, arg); va_end(arg); |