From 362c8137b4f2b0581957f94c36c67a5d69860752 Mon Sep 17 00:00:00 2001 From: Jiyoung Yun Date: Thu, 26 Feb 2015 11:06:19 +0900 Subject: [PATCH] modify system-info key string Signed-off-by: Jiyoung Yun Change-Id: Ib9f5b04ba67326dc176aaa1183504ee840bd8dc3 --- src/sdb.c | 3 ++- src/services.c | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/sdb.c b/src/sdb.c index 20d190a..5804ab7 100644 --- a/src/sdb.c +++ b/src/sdb.c @@ -44,6 +44,7 @@ #endif #include #define PROC_CMDLINE_PATH "/proc/cmdline" +#define SYSTEM_INFO_KEY_MODEL "http://tizen.org/system/model_name" #if SDB_TRACE SDB_MUTEX_DEFINE( D_lock ); #endif @@ -406,7 +407,7 @@ int get_emulator_name(char str[], int str_size) { int get_device_name(char str[], int str_size) { char *value = NULL; - int r = system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &value); + int r = system_info_get_platform_string(SYSTEM_INFO_KEY_MODEL, &value); if (r != SYSTEM_INFO_ERROR_NONE) { D("fail to get system model:%d\n", errno); return -1; diff --git a/src/services.c b/src/services.c index 0113d96..2b2174e 100644 --- a/src/services.c +++ b/src/services.c @@ -41,6 +41,10 @@ #include "strutils.h" #include #include + +#define SYSTEM_INFO_KEY_MODEL "http://tizen.org/system/model_name" +#define SYSTEM_INFO_KEY_PLATFORM_NAME "http://tizen.org/system/platform.name" + typedef struct stinfo stinfo; struct stinfo { @@ -598,7 +602,7 @@ static void get_platforminfo(int fd, void *cookie) { char *value = NULL; s_strncpy(sysinfo.platform_info_version, INFO_VERSION, strlen(INFO_VERSION)); - int r = system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &value); + int r = system_info_get_platform_string(SYSTEM_INFO_KEY_MODEL, &value); if (r != SYSTEM_INFO_ERROR_NONE) { s_strncpy(sysinfo.model_name, UNKNOWN, strlen(UNKNOWN)); D("fail to get system model:%d\n", errno); @@ -610,7 +614,7 @@ static void get_platforminfo(int fd, void *cookie) { } } - r = system_info_get_value_string(SYSTEM_INFO_KEY_PLATFORM_NAME, &value); + r = system_info_get_platform_string(SYSTEM_INFO_KEY_PLATFORM_NAME, &value); if (r != SYSTEM_INFO_ERROR_NONE) { s_strncpy(sysinfo.platform_name, UNKNOWN, strlen(UNKNOWN)); D("fail to get platform name:%d\n", errno); -- 2.7.4