#include <sys/stat.h>
#include <sys/xattr.h>
#include <ctype.h>
+#include <tzplatform_config.h>
#ifndef API
#define API __attribute__ ((visibility("default")))
#ifdef VCONF_USE_SQLFS_TRANSACTION
int IN_SBOX=0;
-#define VCONF_MOUNT_PATH "/opt/var/kdb/db"
+#define VCONF_MOUNT_PATH tzplatform_mkpath(TZ_SYS_CONFIG,"db")
#define VCONF_MOUNT_PATH_CHECK \
do{\
if(!IN_SBOX) \
- IN_SBOX = access("/opt/var/kdb/kdb_first_boot", F_OK) + 2; \
+ IN_SBOX = access(tzplatform_mkpath(TZ_SYS_CONFIG,"kdb_first_boot"), F_OK) + 2; \
if(2==IN_SBOX) return 0;\
}while(0)
keynode_t **before_keynode)
{
keynode_t *found_node, *temp_node = NULL;
+ size_t length = 1 + strlen(keyname);
found_node = _vconf_keylist_headnode(keylist);
return NULL;
}
- if (!strncmp(keyname, found_node->keyname, strlen(keyname))) {
+ if (!memcmp(keyname, found_node->keyname, length)) {
if (before_keynode) {
*before_keynode = temp_node;
}