From dd61cb4e10221cd9e5ccda8affea05d4a07d49d9 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Mon, 21 May 2018 16:42:29 +0900 Subject: [PATCH] bufmgr: change the local vars change the version variables Change-Id: I4bf5eb6a3f90ab1e98b9fbf9379b32e9e742178a --- src/tbm_bufmgr.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/tbm_bufmgr.c b/src/tbm_bufmgr.c index 2a8ec4a..8f39d72 100644 --- a/src/tbm_bufmgr.c +++ b/src/tbm_bufmgr.c @@ -207,29 +207,29 @@ _tbm_util_get_appname_from_pid(long pid, char *str) static int _check_version(TBMModuleVersionInfo *data) { - int abimaj, abimin; - int vermaj, vermin; + int backend_module_major, backend_module_minor; + int tbm_backend_major, tbm_backend_minor; - abimaj = GET_ABI_MAJOR(data->abiversion); - abimin = GET_ABI_MINOR(data->abiversion); + backend_module_major = GET_ABI_MAJOR(data->abiversion); + backend_module_minor = GET_ABI_MINOR(data->abiversion); TBM_DBG("TBM module %s: vendor=\"%s\" ABI=%d,%d\n", data->modname ? data->modname : "UNKNOWN!", - data->vendor ? data->vendor : "UNKNOWN!", abimaj, abimin); + data->vendor ? data->vendor : "UNKNOWN!", backend_module_major, backend_module_minor); - vermaj = GET_ABI_MAJOR(TBM_ABI_VERSION); - vermin = GET_ABI_MINOR(TBM_ABI_VERSION); + tbm_backend_major = GET_ABI_MAJOR(TBM_ABI_VERSION); + tbm_backend_minor = GET_ABI_MINOR(TBM_ABI_VERSION); TBM_DBG("TBM ABI version %d.%d\n", - vermaj, vermin); + tbm_backend_major, tbm_backend_minor); - if (abimaj != vermaj) { + if (backend_module_major != tbm_backend_major) { TBM_ERR("TBM module ABI major ver(%d) doesn't match the TBM's ver(%d)\n", - abimaj, vermaj); + backend_module_major, tbm_backend_major); return 0; - } else if (abimin > vermin) { + } else if (backend_module_minor > tbm_backend_minor) { TBM_ERR("TBM module ABI minor ver(%d) is newer than the TBM's ver(%d)\n", - abimin, vermin); + backend_module_minor, tbm_backend_minor); return 0; } @@ -282,8 +282,8 @@ _tbm_backend_load_module(tbm_bufmgr bufmgr, const char *file) void *module_data = NULL; tbm_backend_module *backend_module_data = NULL; tbm_backend_bufmgr_data *bufmgr_data = NULL; - int abimaj, abimin; - int vermaj, vermin; + int backend_module_major, backend_module_minor; + int tbm_backend_major, tbm_backend_minor; tbm_error_e error; snprintf(path, sizeof(path), BUFMGR_MODULE_DIR "/%s", file); @@ -300,25 +300,25 @@ _tbm_backend_load_module(tbm_bufmgr bufmgr, const char *file) goto err; } - abimaj = GET_ABI_MAJOR(backend_module_data->abi_version); - abimin = GET_ABI_MINOR(backend_module_data->abi_version); + tbm_backend_major = GET_ABI_MAJOR(TBM_BACKEND_ABI_LATEST_VERSION); + tbm_backend_minor = GET_ABI_MINOR(TBM_BACKEND_ABI_LATEST_VERSION); + TBM_INFO("TBM Backend ABI version %d.%d\n", tbm_backend_major, tbm_backend_minor); - TBM_DBG("TBM module %s: vendor=\"%s\" ABI=%d,%d\n", + backend_module_major = GET_ABI_MAJOR(backend_module_data->abi_version); + backend_module_minor = GET_ABI_MINOR(backend_module_data->abi_version); + + TBM_INFO("TBM module %s: vendor=\"%s\" Backend ABI version=%d.%d\n", backend_module_data->name ? backend_module_data->name : "UNKNOWN!", backend_module_data->vendor ? backend_module_data->vendor : "UNKNOWN!", - abimaj, abimin); - - vermaj = GET_ABI_MAJOR(TBM_BACKEND_ABI_LATEST_VERSION); - vermin = GET_ABI_MINOR(TBM_BACKEND_ABI_LATEST_VERSION); - TBM_DBG("TBM ABI version %d.%d\n", vermaj, vermin); + backend_module_major, backend_module_minor); - if (abimaj > vermaj) { + if (backend_module_major > tbm_backend_major) { TBM_ERR("TBM module ABI major ver(%d) is newer than the TBM's ver(%d)\n", - abimaj, vermaj); + backend_module_major, tbm_backend_major); goto err; - } else if (abimin > vermin) { + } else if (backend_module_minor > tbm_backend_minor) { TBM_ERR("TBM module ABI minor ver(%d) is newer than the TBM's ver(%d)\n", - abimin, vermin); + backend_module_minor, tbm_backend_minor); goto err; } -- 2.7.4