build info: change build info operation to read /etc/info.ini file 80/35480/2 submit/tizen/20150217.071721 submit/tizen_mobile/20150217.071853 submit/tizen_tv/20150217.071749
authorTaeyoung Kim <ty317.kim@samsung.com>
Mon, 16 Feb 2015 10:20:28 +0000 (19:20 +0900)
committerTaeyoung Kim <ty317.kim@samsung.com>
Mon, 16 Feb 2015 10:27:35 +0000 (19:27 +0900)
- Build information is created when image is created.
- Build information is storaged in /etc/info.ini and thus
  system-info should read the ini file.
- The keys for build information is already opened to tizen.org
  https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.native.appprogramming/html/guide/system/sysinfo.htm

Change-Id: Id8044d8edb681fb9c8bdb50e8a9345914be3a732
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
src/system_info_no_file.c

index 9b87191..d64e4f7 100644 (file)
@@ -80,14 +80,17 @@ int system_info_get_no_file(const char *key, void **value)
        else
                p_key = (char *)key;
 
-       if (!strncmp(p_key, "tizen.org/system/tizenid", strlen(p_key))) {
+       if (!strncmp(p_key, "tizen.org/system/tizenid", strlen(p_key)))
                return get_tizenid((char **)value);
-       }
 
-       if (!strncmp(p_key, "tizen.org/system/build.date", strlen(p_key)) ||
-           !strncmp(p_key, "tizen.org/system/build.string", strlen(p_key)) ||
-               !strncmp(p_key, "tizen.org/system/build.time", strlen(p_key)))
-               return system_info_get_platform_string(p_key, (char **)value);
+       if (!strncmp(p_key, "tizen.org/system/build.date", strlen(p_key)))
+               return system_info_ini_get_string(INFO_FILE_PATH, "build:date", (char **)value);
+
+       if (!strncmp(p_key, "tizen.org/system/build.string", strlen(p_key)))
+               return system_info_ini_get_string(INFO_FILE_PATH, "version:build", (char **)value);
+
+       if (!strncmp(p_key, "tizen.org/system/build.time", strlen(p_key)))
+               return system_info_ini_get_string(INFO_FILE_PATH, "build:time", (char **)value);
 
        return -ENOENT;
 }