Use apex name for partition name

This makes it so that we can use crosvm to create the composite disk.
While it's not strictly necessary, it greatly simplifies the process
because we don't need to coordinate keeping the partition names from
mk_payload and crosvm consistent.

Bug: 228998637
Test: mk_payload --metadata-only <config> payload.img.metadata
Change-Id: I5a9dbdd6d62de800964743d8609807ae609bf6ff
This commit is contained in:
Richard Fung 2022-04-27 17:55:20 +00:00
parent 017c47b3c1
commit 4635b628a8
1 changed files with 2 additions and 3 deletions

View File

@ -166,11 +166,10 @@ Result<void> MakeMetadata(const Config& config, const std::string& filename) {
Metadata metadata;
metadata.set_version(1);
int apex_index = 0;
for (const auto& apex_config : config.apexes) {
auto* apex = metadata.add_apexes();
apex->set_name(apex_config.name);
apex->set_partition_name("microdroid-apex-" + std::to_string(apex_index++));
apex->set_partition_name(apex_config.name);
apex->set_is_factory(true);
}
@ -303,4 +302,4 @@ int main(int argc, char** argv) {
}
return 0;
}
}