From: Changseok, Oh Date: Wed, 24 Apr 2024 07:13:27 +0000 (+0900) Subject: Add core abi capability X-Git-Tag: accepted/tizen/unified/20240502.044702^0 X-Git-Url: http://review.tizen.org/git/?p=sdk%2Ftarget%2Fsdbd.git;a=commitdiff_plain;h=refs%2Fheads%2Ftizen Add core abi capability --- diff --git a/src/sdb.c b/src/sdb.c index 255ebc3..7b33f8a 100755 --- a/src/sdb.c +++ b/src/sdb.c @@ -1784,6 +1784,19 @@ static void init_capabilities(void) { } } + // Core ABI (That value can be a "arm_32", "arm_64", "riscv_32", "riscv_64", "x86", "x86_64") + ret = system_info_get_platform_string("http://tizen.org/feature/platform.core.abi", &value); + if (ret != SYSTEM_INFO_ERROR_NONE) { + snprintf(g_capabilities.core_abi, sizeof(g_capabilities.core_abi), + "%s", UNKNOWN); + E("fail to get the core abi:%d\n", errno); + } else { + if (value != NULL) { + snprintf(g_capabilities.core_abi, sizeof(g_capabilities.core_abi), "%s", value); + free(value); + } + } + // Secure protocol support if(!request_capability_to_plugin(CAPABILITY_SECURE, g_capabilities.secure_protocol, diff --git a/src/sdb.h b/src/sdb.h index 1e51745..9d77bbe 100755 --- a/src/sdb.h +++ b/src/sdb.h @@ -288,6 +288,7 @@ typedef struct platform_capabilities char log_path[CAPBUF_LL_ITEMSIZE]; // path of sdbd log char cpu_arch[CAPBUF_ITEMSIZE]; // cpu architecture (ex. x86) + char core_abi[CAPBUF_ITEMSIZE]; char profile_name[CAPBUF_ITEMSIZE]; // profile name (ex. mobile) char vendor_name[CAPBUF_ITEMSIZE]; // vendor name (ex. Tizen) char sdk_toolpath[CAPBUF_L_ITEMSIZE]; // sdk tool path diff --git a/src/services.c b/src/services.c index 8f8a1a5..ab92b1e 100755 --- a/src/services.c +++ b/src/services.c @@ -1325,6 +1325,10 @@ static void get_capability(int fd, void *cookie) { offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE, "cpu_arch", g_capabilities.cpu_arch); + // Core ABI + offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE, + "core_abi", g_capabilities.core_abi); + // SDK Tool path offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE, "sdk_toolpath", g_capabilities.sdk_toolpath);