common: Use default library name if the given one matches the default 98/319598/1 accepted/tizen_7.0_unified tizen_7.0 accepted/tizen/7.0/unified/20250218.165114
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 12 Feb 2025 07:40:13 +0000 (16:40 +0900)
committeryoungjae cho <y0.cho@samsung.com>
Thu, 13 Feb 2025 08:39:18 +0000 (08:39 +0000)
The hal_common_get_backend_with_library() can give a library name
that is totally the same as the default one. If then, use the default
one and do not make hashtable entry for the same given one.

Change-Id: I0ba489ec815167b03f12ad2fb6eab3cf4bf8f0ca
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit c57449d2a0abb1b95dd7e395448859de1917edd7)

src/hal-api-conf.c

index 9495d3b6c86b7d27da41890bde1751862a4d484c..7977a6044365653dcae5f750e5dfcdd6c2b83553 100644 (file)
@@ -81,6 +81,14 @@ static struct __hal_module_info* _get_module_info_with_library_name(enum hal_mod
                                tmp_info->module_name);
                return NULL;
        }
+
+#if defined(__aarch64__) || defined(__x86_64__) || defined (__riscv)
+       if (g_strcmp0(library_name, tmp_info->library_name_64bit) == 0)
+#else
+       if (g_strcmp0(library_name, tmp_info->library_name) == 0)
+#endif
+               return tmp_info;
+
        library_name_prefix = g_strdup_printf("libhal-backend-%s",
                                tmp_info->backend_module_name);
        if (!library_name_prefix) {