diff options
author | Ronan Le Martret <ronan@fridu.net> | 2014-09-17 12:29:20 +0200 |
---|---|---|
committer | Ronan Le Martret <ronan@fridu.net> | 2014-09-26 18:03:28 +0200 |
commit | acf2a6bba758597b9443419c6f466ece52d0f570 (patch) | |
tree | a0626fe27de49f1a6adc71e372bcb33fcd7aeead | |
parent | ddfbfa59068a46999afcd645dda13a73680c825c (diff) | |
download | vconf-acf2a6bba758597b9443419c6f466ece52d0f570.tar.gz vconf-acf2a6bba758597b9443419c6f466ece52d0f570.tar.bz2 vconf-acf2a6bba758597b9443419c6f466ece52d0f570.zip |
Replace hard coded path /var/run by the tizen-platform-config macro
- mandatory for yocto image
Change-Id: Ic32f272e950ead95dbf37800aae3592a511192fe
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
-rwxr-xr-x | include/vconf-internals.h | 2 | ||||
-rw-r--r-- | test/vconf_unit_test.c | 2 | ||||
-rwxr-xr-x | vconf-init | 6 | ||||
-rwxr-xr-x | vconftool.c | 4 |
4 files changed, 6 insertions, 8 deletions
diff --git a/include/vconf-internals.h b/include/vconf-internals.h index b0c68d7..fc7b1eb 100755 --- a/include/vconf-internals.h +++ b/include/vconf-internals.h @@ -39,7 +39,7 @@ #define BACKEND_MEMORY_PREFIX "memory/" #define BACKEND_SYSTEM_DIR tzplatform_getenv(TZ_SYS_CONFIG) -#define BACKEND_MEMORY_DIR "/var/run/" +#define BACKEND_MEMORY_DIR tzplatform_getenv(TZ_SYS_RUN) /* This value can be optimized according to the device characteristcs and file system configuration */ #define FILE_ATOMIC_GUARANTEE_SIZE 4096 diff --git a/test/vconf_unit_test.c b/test/vconf_unit_test.c index 736c351..58f5fb2 100644 --- a/test/vconf_unit_test.c +++ b/test/vconf_unit_test.c @@ -196,7 +196,7 @@ void unset_operation(int i) } const char *test_dir[5]={ - "/opt/var/kdb/db/unittest", "/opt/var/kdb/file/unittest", "/var/run/memory/unittest", + "/opt/var/kdb/db/unittest", "/opt/var/kdb/file/unittest", tzplatform_mkpath3(TZ_SYS_CONFIG,"memory","unittest"), "/opt/var/gconf/local/unittest", "/opt/var/gconf/unittest"}; void recursive_unset_operation(void) @@ -2,10 +2,10 @@ source /etc/tizen-platform.conf -mkdir /var/run/memory -chmod 777 /var/run/memory +mkdir -p ${TZ_SYS_RUN}/memory +chmod 777 ${TZ_SYS_RUN}/memory set -e -cp -a ${TZ_SYS_CONFIG}/memory_init/memory/* /var/run/memory +cp -a ${TZ_SYS_CONFIG}/memory_init/memory/* ${TZ_SYS_RUN}/memory diff --git a/vconftool.c b/vconftool.c index 1469b73..be9dcfc 100755 --- a/vconftool.c +++ b/vconftool.c @@ -53,8 +53,6 @@ const char *BACKEND_DB_PREFIX = "db/"; const char *BACKEND_FILE_PREFIX = "file/"; const char *BACKEND_MEMORY_PREFIX = "memory/"; -const char *MEMORY_PREFIX = "/var/run"; - static char *guid = NULL; static char *uid = NULL; static char *vconf_type = NULL; @@ -364,7 +362,7 @@ static int make_file_path(char *pszKey, char *pszBuf) } else if (0 == strncmp(pszKey, BACKEND_MEMORY_PREFIX, strlen(BACKEND_MEMORY_PREFIX))) { - snprintf(pszBuf, BUFSIZE, "%s/%s", MEMORY_PREFIX, pszKey); + snprintf(pszBuf, BUFSIZE, "%s/%s", tzplatform_getenv(TZ_SYS_RUN), pszKey); return 0; } return -1; |