tools: hal-compatibility-checker: Print error log 47/310147/2
authorYoungjae Cho <y0.cho@samsung.com>
Tue, 23 Apr 2024 05:53:01 +0000 (14:53 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Tue, 23 Apr 2024 09:13:56 +0000 (18:13 +0900)
Change-Id: Id7adda83f8625065c2a48f4284265f5525c374b9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
tools/hal-compatibility-checker/main.c

index e5879e2ea10eb838ce5308fe3141b9421a85fd62..c4eb3e6fecc912e687e2fea27ef78972b41c4bc4 100644 (file)
@@ -25,6 +25,7 @@
 #include <getopt.h>
 #include <string.h>
 
+#include <dlog/dlog.h>
 #include <dlog/dlog-redirect-stdout.h>
 #include <hal-common.h>
 
@@ -222,7 +223,16 @@ int main(int argc, char *argv[])
 
        for (enum hal_module module = 0; module < HAL_MODULE_END; ++module) {
                enum hal_common_backend_compatibility compatibility;
-               hal_common_check_backend_compatibility(module, &compatibility);
+               char module_name[128] = "Unknown";
+               int ret;
+
+               ret = hal_common_check_backend_compatibility(module, &compatibility);
+               if (ret < 0) {
+                       hal_common_get_backend_module_name(module, module_name, sizeof(module_name));
+                       dlog_print(DLOG_ERROR, LOG_TAG_HAL_COMPATIBILITY_CHECKER,
+                               "Failed to check backend(%d:%s) compatibility, %d",
+                               module, module_name, ret);
+               }
        }
 
        return 0;