Do not map dynamic partitions on VABC devices
With VABC, we no longer need to map all partitions before
reading/writing, so don't try to map them.
1. modify GetPartitionDevice to return empty path for target partitions
on VABC
2. Add a separate GetMountableTargetDevice for obtaining a mountable
device path, specifically for postinstall
Test: treehugger
Change-Id: Ib1f608914fc49c677ce7389140ca79b028171191
diff --git a/payload_consumer/install_plan.h b/payload_consumer/install_plan.h
index ee1a72b..7068f6c 100644
--- a/payload_consumer/install_plan.h
+++ b/payload_consumer/install_plan.h
@@ -98,9 +98,17 @@
uint64_t source_size{0};
brillo::Blob source_hash;
+ // |target_path| is intended to be a path to block device, which you can
+ // open with |open| syscall and perform regular unix style read/write.
+ // For VABC, this will be empty. As you can't read/write VABC devices with
+ // regular syscall.
std::string target_path;
+ // |mountable_target_device| is intended to be a path to block device which
+ // can be used for mounting this block device's underlying filesystem.
+ std::string postinstall_mount_device;
uint64_t target_size{0};
brillo::Blob target_hash;
+
uint32_t block_size{0};
// Whether we should run the postinstall script from this partition and the