Loading fs_mgr/liblp/builder.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -171,7 +171,8 @@ std::unique_ptr<MetadataBuilder> MetadataBuilder::New(const LpMetadata& metadata std::unique_ptr<MetadataBuilder> MetadataBuilder::NewForUpdate(const IPartitionOpener& opener, const std::string& source_partition, uint32_t source_slot_number, uint32_t target_slot_number) { uint32_t target_slot_number, bool always_keep_source_slot) { auto metadata = ReadMetadata(opener, source_partition, source_slot_number); if (!metadata) { return nullptr; Loading @@ -189,7 +190,8 @@ std::unique_ptr<MetadataBuilder> MetadataBuilder::NewForUpdate(const IPartitionO } } if (IPropertyFetcher::GetInstance()->GetBoolProperty("ro.virtual_ab.enabled", false)) { if (IPropertyFetcher::GetInstance()->GetBoolProperty("ro.virtual_ab.enabled", false) && !always_keep_source_slot) { if (!UpdateMetadataForInPlaceSnapshot(metadata.get(), source_slot_number, target_slot_number)) { return nullptr; Loading fs_mgr/liblp/include/liblp/builder.h +4 −1 Original line number Diff line number Diff line Loading @@ -209,10 +209,13 @@ class MetadataBuilder { // metadata may not have the target slot's devices listed yet, in which // case, it is automatically upgraded to include all available block // devices. // If |always_keep_source_slot| is set, on a Virtual A/B device, source slot // partitions are kept. This is useful when applying a downgrade package. static std::unique_ptr<MetadataBuilder> NewForUpdate(const IPartitionOpener& opener, const std::string& source_partition, uint32_t source_slot_number, uint32_t target_slot_number); uint32_t target_slot_number, bool always_keep_source_slot = false); // Import an existing table for modification. If the table is not valid, for // example it contains duplicate partition names, then nullptr is returned. Loading Loading
fs_mgr/liblp/builder.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -171,7 +171,8 @@ std::unique_ptr<MetadataBuilder> MetadataBuilder::New(const LpMetadata& metadata std::unique_ptr<MetadataBuilder> MetadataBuilder::NewForUpdate(const IPartitionOpener& opener, const std::string& source_partition, uint32_t source_slot_number, uint32_t target_slot_number) { uint32_t target_slot_number, bool always_keep_source_slot) { auto metadata = ReadMetadata(opener, source_partition, source_slot_number); if (!metadata) { return nullptr; Loading @@ -189,7 +190,8 @@ std::unique_ptr<MetadataBuilder> MetadataBuilder::NewForUpdate(const IPartitionO } } if (IPropertyFetcher::GetInstance()->GetBoolProperty("ro.virtual_ab.enabled", false)) { if (IPropertyFetcher::GetInstance()->GetBoolProperty("ro.virtual_ab.enabled", false) && !always_keep_source_slot) { if (!UpdateMetadataForInPlaceSnapshot(metadata.get(), source_slot_number, target_slot_number)) { return nullptr; Loading
fs_mgr/liblp/include/liblp/builder.h +4 −1 Original line number Diff line number Diff line Loading @@ -209,10 +209,13 @@ class MetadataBuilder { // metadata may not have the target slot's devices listed yet, in which // case, it is automatically upgraded to include all available block // devices. // If |always_keep_source_slot| is set, on a Virtual A/B device, source slot // partitions are kept. This is useful when applying a downgrade package. static std::unique_ptr<MetadataBuilder> NewForUpdate(const IPartitionOpener& opener, const std::string& source_partition, uint32_t source_slot_number, uint32_t target_slot_number); uint32_t target_slot_number, bool always_keep_source_slot = false); // Import an existing table for modification. If the table is not valid, for // example it contains duplicate partition names, then nullptr is returned. Loading