From c1e9a23532f519f2f1f95ccdba5b167769e73670 Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Wed, 12 Oct 2016 22:14:51 +0900 Subject: [PATCH] include config.h in all c file and fixed dlog level Change-Id: I38fcd99e965afc36ede781b6a6250e8197673221 --- src/tbm_bufmgr.c | 2 +- src/tbm_bufmgr_int.h | 2 +- src/tbm_drm_helper_client.c | 2 ++ src/tbm_drm_helper_server.c | 8 +------- src/tbm_surface.c | 1 + src/tbm_surface_internal.c | 1 + src/tbm_surface_queue.c | 2 ++ src/tbm_sync.c | 9 +++++++-- 8 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/tbm_bufmgr.c b/src/tbm_bufmgr.c index b27b6d3..c9633c9 100644 --- a/src/tbm_bufmgr.c +++ b/src/tbm_bufmgr.c @@ -681,7 +681,7 @@ tbm_bufmgr_init(int fd) #ifdef TBM_BUFMGR_INIT_TIME /* get the end tv */ - gettimeofday(&end_tv, NULL); + gettimeofday(&end_tv, NULL); TBM_LOG_I("tbm_bufmgr_init time: %ld ms", ((end_tv.tv_sec * 1000 + end_tv.tv_usec / 1000) - (start_tv.tv_sec * 1000 + start_tv.tv_usec / 1000))); #endif diff --git a/src/tbm_bufmgr_int.h b/src/tbm_bufmgr_int.h index 94b7019..364ffd1 100644 --- a/src/tbm_bufmgr_int.h +++ b/src/tbm_bufmgr_int.h @@ -93,7 +93,7 @@ extern int bDlog; #define TBM_LOG_I(fmt, ...) {\ if (bDlog) {\ - LOGD("[TBM:I] " fmt, ##__VA_ARGS__);\ + LOGI("[TBM:I] " fmt, ##__VA_ARGS__);\ } \ else {\ fprintf(stderr, "[TBM:I(%d)(%s:%d)] " fmt, getpid(), __func__, __LINE__, ##__VA_ARGS__);\ diff --git a/src/tbm_drm_helper_client.c b/src/tbm_drm_helper_client.c index ac86115..172a7a9 100644 --- a/src/tbm_drm_helper_client.c +++ b/src/tbm_drm_helper_client.c @@ -31,6 +31,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define WL_HIDE_DEPRECATED +#include "config.h" + #include #include #include diff --git a/src/tbm_drm_helper_server.c b/src/tbm_drm_helper_server.c index 568f0e9..b10f88a 100644 --- a/src/tbm_drm_helper_server.c +++ b/src/tbm_drm_helper_server.c @@ -31,13 +31,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define WL_HIDE_DEPRECATED -#include -#include -#include -#include -#include -#include -#include +#include "config.h" #include diff --git a/src/tbm_surface.c b/src/tbm_surface.c index 1277c80..a05ae06 100644 --- a/src/tbm_surface.c +++ b/src/tbm_surface.c @@ -30,6 +30,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ #include "config.h" + #include "tbm_bufmgr.h" #include "tbm_bufmgr_int.h" #include "tbm_surface_internal.h" diff --git a/src/tbm_surface_internal.c b/src/tbm_surface_internal.c index 6a086f8..71dd8aa 100644 --- a/src/tbm_surface_internal.c +++ b/src/tbm_surface_internal.c @@ -30,6 +30,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ #include "config.h" + #include #include #include diff --git a/src/tbm_surface_queue.c b/src/tbm_surface_queue.c index 51fcfc0..9cafcaf 100644 --- a/src/tbm_surface_queue.c +++ b/src/tbm_surface_queue.c @@ -29,6 +29,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +#include "config.h" + #include "tbm_bufmgr_int.h" #include "list.h" diff --git a/src/tbm_sync.c b/src/tbm_sync.c index feab1ee..9ebca2e 100644 --- a/src/tbm_sync.c +++ b/src/tbm_sync.c @@ -31,6 +31,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +#include "config.h" + #include "tbm_bufmgr_int.h" #include "tbm_sync.h" @@ -75,10 +77,13 @@ _log_errno() int errnum = errno; char buf[ERRNO_BUF_SIZE]; - if (strerror_r(errnum, buf, ERRNO_BUF_SIZE) == 0) + if (strerror_r(errnum, buf, ERRNO_BUF_SIZE) == 0) { TBM_LOG_E("errno : %d(%s)\n", errnum, buf); - else + return; + } else { TBM_LOG_E("errno : %d()\n", errnum); + return; + } } static inline void -- 2.7.4