提交 864d93b9 编写于 作者: Z zhangxiaoyu

iSulad: add LIB_ISULAD_IMG_SO for libisulad_img.so to avoid func do_integration_of_images_check()

Signed-off-by: Nzhangxiaoyu <zhangxiaoyu58@huawei.com>
上级 8ded222d
...@@ -100,5 +100,7 @@ target_link_libraries(${LIB_ISULAD_IMG} ...@@ -100,5 +100,7 @@ target_link_libraries(${LIB_ISULAD_IMG}
${SELINUX_LIBRARY} ${SELINUX_LIBRARY}
-lpthread -lcrypto -larchive -lz libhttpclient) -lpthread -lcrypto -larchive -lz libhttpclient)
target_compile_definitions(${LIB_ISULAD_IMG} PRIVATE LIB_ISULAD_IMG_SO)
install(TARGETS ${LIB_ISULAD_IMG} install(TARGETS ${LIB_ISULAD_IMG}
LIBRARY DESTINATION ${LIB_INSTALL_DIR_DEFAULT} PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE) LIBRARY DESTINATION ${LIB_INSTALL_DIR_DEFAULT} PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE)
...@@ -53,6 +53,7 @@ static char *format_driver_name(const char *driver) ...@@ -53,6 +53,7 @@ static char *format_driver_name(const char *driver)
} }
} }
#ifndef LIB_ISULAD_IMG_SO
static int do_integration_of_images_check(bool image_layer_check, struct storage_module_init_options *opts) static int do_integration_of_images_check(bool image_layer_check, struct storage_module_init_options *opts)
{ {
char *check_file = NULL; char *check_file = NULL;
...@@ -89,6 +90,7 @@ out: ...@@ -89,6 +90,7 @@ out:
free(check_file); free(check_file);
return ret; return ret;
} }
#endif // LIB_ISULAD_IMG_SO
static int storage_module_init_helper(const isulad_daemon_configs *args) static int storage_module_init_helper(const isulad_daemon_configs *args)
{ {
...@@ -130,10 +132,12 @@ static int storage_module_init_helper(const isulad_daemon_configs *args) ...@@ -130,10 +132,12 @@ static int storage_module_init_helper(const isulad_daemon_configs *args)
goto out; goto out;
} }
#ifndef LIB_ISULAD_IMG_SO
if (do_integration_of_images_check(args->image_layer_check, storage_opts) != 0) { if (do_integration_of_images_check(args->image_layer_check, storage_opts) != 0) {
ret = -1; ret = -1;
goto out; goto out;
} }
#endif // LIB_ISULAD_IMG_SO
if (storage_module_init(storage_opts) != 0) { if (storage_module_init(storage_opts) != 0) {
ERROR("Failed to init storage module"); ERROR("Failed to init storage module");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册