Add core abi capability accepted/tizen/unified/20240502.044702 accepted/tizen/unified/toolchain/20240507.011941 accepted/tizen/unified/x/20240503.091125
authorChangseok, Oh <seok.oh@samsung.com>
Wed, 24 Apr 2024 07:13:27 +0000 (16:13 +0900)
committerChangseok, Oh <seok.oh@samsung.com>
Wed, 24 Apr 2024 07:13:27 +0000 (16:13 +0900)
src/sdb.c
src/sdb.h
src/services.c

index 255ebc3a792e89ec22af2c6272c17ee10c70cdd7..7b33f8a843b34071576dad0b65daf425a0e204c7 100755 (executable)
--- 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,
index 1e51745e89c10b085d3c9ac716066a4200947913..9d77bbec207e96f534ae03510e535769076f1864 100755 (executable)
--- 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
index 8f8a1a54d5916bfb8280b3095a39a87c4069c721..ab92b1eecd6a632ce7512e7a58901d15ac03fddd 100755 (executable)
@@ -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);