Add core abi capability tizen
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 255ebc3..7b33f8a 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 1e51745..9d77bbe 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 8f8a1a5..ab92b1e 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);