summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Moreau <christophe.moreau@open.eurogiciel.org>2014-06-12 12:32:30 (GMT)
committerChristophe Moreau <christophe.moreau@open.eurogiciel.org>2014-06-13 13:58:02 (GMT)
commit95b05c31e2452b1fc4c315905348445e9dd0ca6e (patch)
tree3fcb923aa7047f49f592ca3d48556c7e762dc859
parent2fd4ce9798adf27cf0814625cc1342c2e51dcbea (diff)
downloadui-gadget-1-95b05c31e2452b1fc4c315905348445e9dd0ca6e.zip
ui-gadget-1-95b05c31e2452b1fc4c315905348445e9dd0ca6e.tar.gz
ui-gadget-1-95b05c31e2452b1fc4c315905348445e9dd0ca6e.tar.bz2
Remove hardcoded paths in module.c filerefs/changes/35/22835/2
Bug-Tizen : TC-333 Change-Id: If4b51db9b2724cb0baac527fe6d31cadf06c8839 Signed-off-by: Christophe Moreau <christophe.moreau@open.eurogiciel.org>
-rw-r--r--src/module.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/module.c b/src/module.c
index e07291e..afc645e 100644
--- a/src/module.c
+++ b/src/module.c
@@ -138,13 +138,13 @@ struct ug_module *ug_module_load(const char *name)
if (file_exist(ug_file))
break;
}
- snprintf(ug_file, PATH_MAX, "/usr/ug/lib/libug-%s.so", name);
+ snprintf(ug_file, PATH_MAX, "%s/lib/libug-%s.so", tzplatform_getenv(TZ_SYS_RO_UG), name);
if (file_exist(ug_file))
break;
- snprintf(ug_file, PATH_MAX, "/opt/ug/lib/libug-%s.so", name);
+ snprintf(ug_file, PATH_MAX, "%s/lib/libug-%s.so", tzplatform_getenv(TZ_SYS_RW_UG), name);
if (file_exist(ug_file))
break;
- snprintf(ug_file, PATH_MAX, "/opt/usr/ug/lib/libug-%s.so", name);
+ snprintf(ug_file, PATH_MAX, "%s/lib/libug-%s.so", tzplatform_getenv(TZ_USER_UG), name);
if (file_exist(ug_file))
break;
} while (0);
@@ -221,17 +221,17 @@ int ug_exist(const char* name)
int ret = 0;
do {
- snprintf(ug_file, PATH_MAX, "/usr/ug/lib/libug-%s.so", name);
+ snprintf(ug_file, PATH_MAX, "%s/lib/libug-%s.so", tzplatform_getenv(TZ_SYS_RO_UG), name);
if (file_exist(ug_file)) {
ret = 1;
break;
}
- snprintf(ug_file, PATH_MAX, "/opt/ug/lib/libug-%s.so", name);
+ snprintf(ug_file, PATH_MAX, "%s/lib/libug-%s.so", tzplatform_getenv(TZ_SYS_RW_UG), name);
if (file_exist(ug_file)) {
ret = 1;
break;
}
- snprintf(ug_file, PATH_MAX, "/opt/usr/ug/lib/libug-%s.so", name);
+ snprintf(ug_file, PATH_MAX, "%s/lib/libug-%s.so", tzplatform_getenv(TZ_USER_UG), name);
if (file_exist(ug_file)) {
ret = 1;
break;