TranformFstabForDsu adds missing partition entries to fstab

Fix odd bug that TranformFstabForDsu doesn't emplace entry to fstab.

.avb_keys should be set to "/avb", the directory that stores all DSU
avbpubkeys, instead of appending.

Bug: 165471299
Test: Boot a multipartition DSU package
Change-Id: I62ee2f8bf7113f6d2af8cc34ef19c9743029ea0a
This commit is contained in:
Yo Chiang 2020-08-19 14:17:37 +08:00
parent 920393ddb7
commit e48dbc2004

View file

@ -640,13 +640,14 @@ void TransformFstabForDsu(Fstab* fstab, const std::vector<std::string>& dsu_part
entry.fs_mgr_flags.wait = true;
entry.fs_mgr_flags.logical = true;
entry.fs_mgr_flags.first_stage_mount = true;
fstab->emplace_back(entry);
} else {
// If the corresponding partition exists, transform all its Fstab
// by pointing .blk_device to the DSU partition.
for (auto&& entry : entries) {
entry->blk_device = partition;
// AVB keys for DSU should always be under kDsuKeysDir.
entry->avb_keys += kDsuKeysDir;
entry->avb_keys = kDsuKeysDir;
}
// Make sure the ext4 is included to support GSI.
auto partition_ext4 =