add f2fs device aliasing related arguments in vold
To support f2fs device aliasing feature, include related arguments in
vold.
Bug: 336319772
Test: add a device with "exp_alias" tag in fstab
Change-Id: Ibb8766f4c77d532a596f5581f3de8dfb334ba2fd
Signed-off-by: Daeho Jeong <daehojeong@google.com>
diff --git a/MetadataCrypt.cpp b/MetadataCrypt.cpp
index 8d83541..2fa0cff 100644
--- a/MetadataCrypt.cpp
+++ b/MetadataCrypt.cpp
@@ -291,7 +291,7 @@
bool needs_encrypt, bool should_format,
const std::string& fs_type, bool is_zoned,
const std::vector<std::string>& user_devices,
- int64_t length) {
+ const std::vector<bool>& device_aliased, int64_t length) {
LOG(DEBUG) << "fscrypt_mount_metadata_encrypted: " << mount_point
<< " encrypt: " << needs_encrypt << " format: " << should_format << " with "
<< fs_type << " block device: " << blk_device << " with zoned " << is_zoned
@@ -385,7 +385,8 @@
if (fs_type == "ext4") {
error = ext4::Format(crypto_blkdev, 0, mount_point);
} else if (fs_type == "f2fs") {
- error = f2fs::Format(crypto_blkdev, is_zoned, crypto_user_blkdev, length);
+ error = f2fs::Format(crypto_blkdev, is_zoned, crypto_user_blkdev, device_aliased,
+ length);
} else {
LOG(ERROR) << "Unknown filesystem type: " << fs_type;
return false;