summaryrefslogtreecommitdiffstats
path: root/cryptfs_hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'cryptfs_hw.c')
-rw-r--r--cryptfs_hw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cryptfs_hw.c b/cryptfs_hw.c
index 2d7b600..d20deff 100644
--- a/cryptfs_hw.c
+++ b/cryptfs_hw.c
@@ -79,7 +79,9 @@ static int (*qseecom_wipe_key)(int);
#define CRYPTFS_HW_ALGO_MODE_AES_XTS 0x3
+#ifndef USE_METADATA_FOR_KEY
#define METADATA_PARTITION_NAME "/dev/block/bootdevice/by-name/metadata"
+#endif
enum cryptfs_hw_key_management_usage_type {
CRYPTFS_HW_KM_USAGE_DISK_ENCRYPTION = 0x01,
@@ -436,6 +438,7 @@ int is_ice_enabled(void)
char prop_storage[PATH_MAX];
int storage_type = 0;
+#ifndef USE_METADATA_FOR_KEY
/*
* Since HW FDE is a compile time flag (due to QSSI requirements),
* this API conflicts with Metadata encryption even when ICE is
@@ -447,6 +450,7 @@ int is_ice_enabled(void)
SLOGI("Metadata partition, returning false");
return 0;
}
+#endif
if (property_get("ro.boot.bootdevice", prop_storage, "")) {
if (strstr(prop_storage, "ufs")) {