Make dynamic partition control android return a writable fd
We can return a FileDescriptor object, which encapsulates logic needed
to write to a COW. This way, filesystem verfication action can use the
turend value directly for computing verity and hash the partition.
Test: th
Change-Id: Iafe9699ef0cc15961641fc94f8ad2820230a56e1
diff --git a/common/dynamic_partition_control_interface.h b/common/dynamic_partition_control_interface.h
index da27932..d5e1d8d 100644
--- a/common/dynamic_partition_control_interface.h
+++ b/common/dynamic_partition_control_interface.h
@@ -165,7 +165,9 @@
const std::string& unsuffixed_partition_name,
const std::optional<std::string>&,
bool is_append = false) = 0;
- virtual FileDescriptorPtr OpenCowReader(
+ // Open a general purpose FD capable to reading and writing to COW. Note that
+ // writes must be block aligned.
+ virtual FileDescriptorPtr OpenCowFd(
const std::string& unsuffixed_partition_name,
const std::optional<std::string>&,
bool is_append = false) = 0;