summaryrefslogtreecommitdiff
path: root/aosp/dynamic_partition_control_android.cc
diff options
context:
space:
mode:
authorKelvin Zhang <zhangkelvin@google.com>2020-09-28 13:23:40 -0400
committerKelvin Zhang <zhangkelvin@google.com>2020-11-17 12:47:59 -0500
commitec205cf8ddc5af1f53c583a4e77f4f7363c8438a (patch)
treeb7d8c4bd7411b8056ab6a218ffec9beb13994558 /aosp/dynamic_partition_control_android.cc
parenteb9de160773d1277a6c3447ebedcfe27d2a45a77 (diff)
Use FileDescriptorPtr to implement async reads in verify stage
During FileSystemVerify stage, update_engine needs to read from source or target partition to verify hashes && write verity. Previously we use brillow's file stream to implement async reads. WIth Virtual AB Compression, reading from target partition must go through libsnapshot's interface(FileDescriptorPtr). So we replace brillo::FileStream with FileDescriptorPtr for ease of integrating with VABC. Test: serve an OTA update, verify: slot switch resume, regular resume Change-Id: Id8531757468f60e3e21667b7761b83f7c2af2dbf
Diffstat (limited to 'aosp/dynamic_partition_control_android.cc')
-rw-r--r--aosp/dynamic_partition_control_android.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/aosp/dynamic_partition_control_android.cc b/aosp/dynamic_partition_control_android.cc
index ca12b3db..3ced3e0c 100644
--- a/aosp/dynamic_partition_control_android.cc
+++ b/aosp/dynamic_partition_control_android.cc
@@ -1265,6 +1265,7 @@ FileDescriptorPtr DynamicPartitionControlAndroid::OpenCowReader(
if (cow_writer == nullptr) {
return nullptr;
}
+ cow_writer->InitializeAppend(kEndOfInstallLabel);
return cow_writer->OpenReader();
}