部件独立编译

Signed-off-by: cuiruibin <cuiruibin3@huawei.com>
This commit is contained in:
cuiruibin 2024-05-18 17:20:43 +08:00
parent f584362685
commit d9bc5ec408
5 changed files with 41 additions and 19 deletions

View File

@ -40,7 +40,10 @@
"common_event_service",
"data_share",
"dfs_service",
"exfatprogs",
"FreeBSD",
"file_api",
"gptfdisk",
"hilog",
"hitrace",
"huks",
@ -48,6 +51,7 @@
"ipc",
"media_library",
"napi",
"ntfs-3g",
"relational_store",
"safwk",
"samgr",

View File

@ -291,16 +291,20 @@ group("storage_daemon_usb_param") {
group("storage_daemon_third_party") {
deps = []
if (storage_service_external_storage_manager && storage_service_fstools) {
deps += [
"//third_party/FreeBSD/sbin/fsck_msdosfs:fsck_msdos",
"//third_party/FreeBSD/sbin/newfs_msdos:newfs_msdos",
"//third_party/e2fsprogs:blkid",
"//third_party/exfatprogs:exfatprogs",
"//third_party/gptfdisk:sgdisk",
"//third_party/ntfs-3g:ntfsprogs",
deps += [ "//third_party/e2fsprogs:blkid" ]
external_deps = [
"FreeBSD:fsck_msdos",
"FreeBSD:newfs_msdos",
"exfatprogs:exfatlabel",
"exfatprogs:fsck.exfat",
"exfatprogs:mkfs.exfat",
"gptfdisk:sgdisk",
"ntfs-3g:fsck.ntfs",
"ntfs-3g:mount.ntfs",
"ntfs-3g:ntfslabel",
]
}
external_deps = [
external_deps += [
"f2fs-tools:fsck.f2fs",
"f2fs-tools:libf2fs",
"f2fs-tools:mkfs.f2fs",

View File

@ -17,13 +17,22 @@
#include <errno.h>
#include "init_log.h"
#include "hilog/log.h"
#ifndef STORAGE_LOG_TAG
#define STORAGE_LOG_TAG "StorageManager"
#endif
#define FSCRYPT_LOG_FILE "fscrypt.log"
#define FSCRYPT_LABEL "FSCRYPT"
#define FSCRYPT_LOGI(fmt, ...) INIT_LOGI(fmt, ##__VA_ARGS__)
#define FSCRYPT_LOGE(fmt, ...) INIT_LOGE(fmt, ##__VA_ARGS__)
#define FSCRYPT_LOGV(fmt, ...) INIT_LOGV(fmt, ##__VA_ARGS__)
#define FSCRYPT_LOGI(fmt, ...) \
((void)HILOG_IMPL(LOG_CORE, LOG_INFO, LOG_DOMAIN, STORAGE_LOG_TAG, \
"[%{public}s:%{public}d] " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__))
#define FSCRYPT_LOGE(fmt, ...) \
((void)HILOG_IMPL(LOG_CORE, LOG_ERROR, LOG_DOMAIN, STORAGE_LOG_TAG, \
"[%{public}s:%{public}d] " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__))
#define FSCRYPT_LOGV(fmt, ...) \
((void)HILOG_IMPL(LOG_CORE, LOG_DEBUG, LOG_DOMAIN, STORAGE_LOG_TAG, \
"[%{public}s:%{public}d] " fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__))
#define FSCRYPT_ERROR_CHECK(ret, statement, format, ...) \
do { \

View File

@ -19,7 +19,6 @@ config("fscrypt_utils_config") {
include_dirs = [
"../include/libfscrypt",
"${start_init_services_path}/log",
"${storage_service_common_path}/include",
]
@ -59,15 +58,19 @@ ohos_static_library("libfscryptutils") {
"src/key_control.c",
"src/sysparam_dynamic.c",
]
defines = [
"STORAGE_LOG_TAG = \"StorageManager\"",
"LOG_DOMAIN = 0xD004300",
]
if (storage_service_user_crypto_manager) {
defines = [ "USER_CRYPTO_MANAGER" ]
defines += [ "USER_CRYPTO_MANAGER" ]
}
configs = [ ":fscrypt_utils_config" ]
external_deps = [
"c_utils:utils",
"hilog:libhilog",
"init:libbegetutil",
]
@ -93,9 +96,12 @@ ohos_static_library("libfscryptutils_static") {
"src/key_control.c",
"src/sysparam_static.c",
]
defines = [
"STORAGE_LOG_TAG = \"StorageManager\"",
"LOG_DOMAIN = 0xD004300",
]
if (storage_service_user_crypto_manager) {
defines = [ "USER_CRYPTO_MANAGER" ]
defines += [ "USER_CRYPTO_MANAGER" ]
}
configs = [ ":fscrypt_utils_config" ]
@ -104,6 +110,7 @@ ohos_static_library("libfscryptutils_static") {
external_deps = [
"bounds_checking_function:libsec_static",
"c_utils:utils",
"hilog:libhilog",
"init:libbegetutil",
]

View File

@ -22,8 +22,6 @@ config("storage_manager_config") {
"../storage_daemon/include",
"../common/include",
"${bundlemanager_framework_path}/services/bundlemgr/include",
"${multimedia_library_path}/frameworks/utils/include",
"${multimedia_library_path}/interfaces/inner_api/media_library_helper/include",
]
}