summaryrefslogtreecommitdiff
path: root/payload_consumer/postinstall_runner_action.cc
diff options
context:
space:
mode:
authorBrian Orr <brianorr@google.com>2021-05-10 11:39:59 -0700
committerBrian Orr <brianorr@google.com>2021-05-10 11:39:59 -0700
commitf79cb91b4218a68642c94a01defc0594e742b3f4 (patch)
tree01ec931931503ed80f181b2d85efb5df0079e4ba /payload_consumer/postinstall_runner_action.cc
parentd650df1d306a5a828e7b13a8cc954196fea44992 (diff)
parent3d4e6e0d7ed2b609e0fe2b4d0fcb250808f97476 (diff)
Merge SP1A.210510.001
Change-Id: If7498b293041f2ae00fd93563417d60a0c13e7c9
Diffstat (limited to 'payload_consumer/postinstall_runner_action.cc')
-rw-r--r--payload_consumer/postinstall_runner_action.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/payload_consumer/postinstall_runner_action.cc b/payload_consumer/postinstall_runner_action.cc
index 8f2d674a..051ccbf7 100644
--- a/payload_consumer/postinstall_runner_action.cc
+++ b/payload_consumer/postinstall_runner_action.cc
@@ -140,7 +140,7 @@ void PostinstallRunnerAction::PerformPartitionPostinstall() {
const InstallPlan::Partition& partition =
install_plan_.partitions[current_partition_];
- const string mountable_device = partition.postinstall_mount_device;
+ const string mountable_device = partition.readonly_target_path;
if (mountable_device.empty()) {
LOG(ERROR) << "Cannot make mountable device from " << partition.target_path;
return CompletePostinstall(ErrorCode::kPostinstallRunnerError);
@@ -383,6 +383,11 @@ void PostinstallRunnerAction::CompletePostinstall(ErrorCode error_code) {
}
}
+ auto dynamic_control = boot_control_->GetDynamicPartitionControl();
+ CHECK(dynamic_control);
+ dynamic_control->UnmapAllPartitions();
+ LOG(INFO) << "Unmapped all partitions.";
+
ScopedActionCompleter completer(processor_, this);
completer.set_code(error_code);
@@ -401,10 +406,6 @@ void PostinstallRunnerAction::CompletePostinstall(ErrorCode error_code) {
if (HasOutputPipe()) {
SetOutputObject(install_plan_);
}
- auto dynamic_control = boot_control_->GetDynamicPartitionControl();
- CHECK(dynamic_control);
- dynamic_control->UnmapAllPartitions();
- LOG(INFO) << "Unmapped all partitions.";
}
void PostinstallRunnerAction::SuspendAction() {