return 1;
}
-static char* get_cpu_architecture()
-{
- int ret = 0;
- bool b_value = false;
-
- ret = system_info_get_platform_bool(
- "http://tizen.org/feature/platform.core.cpu.arch.armv6", &b_value);
- if (ret == SYSTEM_INFO_ERROR_NONE && b_value) {
- return CPUARCH_ARMV6;
- }
-
- ret = system_info_get_platform_bool(
- "http://tizen.org/feature/platform.core.cpu.arch.armv7", &b_value);
- if (ret == SYSTEM_INFO_ERROR_NONE && b_value) {
- return CPUARCH_ARMV7;
- }
-
- ret = system_info_get_platform_bool(
- "http://tizen.org/feature/platform.core.cpu.arch.x86", &b_value);
- if (ret == SYSTEM_INFO_ERROR_NONE && b_value) {
- return CPUARCH_X86;
- }
-
- D("fail to get the CPU architecture of model:%d\n", errno);
- return UNKNOWN;
-}
-
static void init_capabilities(void) {
int ret = -1;
char *value = NULL;
memset(&g_capabilities, 0, sizeof(g_capabilities));
// CPU Architecture of model
- snprintf(g_capabilities.cpu_arch, sizeof(g_capabilities.cpu_arch),
- "%s", get_cpu_architecture());
+ ret = system_info_get_platform_string("http://tizen.org/feature/platform.core.cpu.arch", &value);
+ if (ret != SYSTEM_INFO_ERROR_NONE) {
+ snprintf(g_capabilities.cpu_arch, sizeof(g_capabilities.cpu_arch),
+ "%s", UNKNOWN);
+ D("fail to get the CPU architecture of model:%d\n", errno);
+ } else {
+ snprintf(g_capabilities.cpu_arch, sizeof(g_capabilities.cpu_arch),
+ "%s", value);
+ if (value != NULL) {
+ free(value);
+ }
+ }
// Secure protocol support
#define ENABLED "enabled"
#define DISABLED "disabled"
-#define CPUARCH_ARMV6 "armv6"
-#define CPUARCH_ARMV7 "armv7"
-#define CPUARCH_X86 "x86"
#define CAPBUF_SIZE 4096
#define CAPBUF_ITEMSIZE 32
#define CAPBUF_L_ITEMSIZE 256