Skip to content

Commit 41d7982

Browse files
Unmmap all partitions after postinstall am: 433d6c4 am: 89c87af
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1662819 Change-Id: Ia67c0f8f903a40c9c14b82980aeb10ff02e8c76c
2 parents 5cc792b + 89c87af commit 41d7982

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

payload_consumer/postinstall_runner_action.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,11 @@ void PostinstallRunnerAction::CompletePostinstall(ErrorCode error_code) {
383383
}
384384
}
385385

386+
auto dynamic_control = boot_control_->GetDynamicPartitionControl();
387+
CHECK(dynamic_control);
388+
dynamic_control->UnmapAllPartitions();
389+
LOG(INFO) << "Unmapped all partitions.";
390+
386391
ScopedActionCompleter completer(processor_, this);
387392
completer.set_code(error_code);
388393

@@ -401,10 +406,6 @@ void PostinstallRunnerAction::CompletePostinstall(ErrorCode error_code) {
401406
if (HasOutputPipe()) {
402407
SetOutputObject(install_plan_);
403408
}
404-
auto dynamic_control = boot_control_->GetDynamicPartitionControl();
405-
CHECK(dynamic_control);
406-
dynamic_control->UnmapAllPartitions();
407-
LOG(INFO) << "Unmapped all partitions.";
408409
}
409410

410411
void PostinstallRunnerAction::SuspendAction() {

payload_consumer/snapshot_extent_writer.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
// limitations under the License.
1515
//
1616

17+
#ifndef UPDATE_ENGINE_SNAPSHOT_EXTENT_WRITER_H_
18+
#define UPDATE_ENGINE_SNAPSHOT_EXTENT_WRITER_H_
19+
1720
#include <cstdint>
1821
#include <vector>
1922

@@ -52,3 +55,5 @@ class SnapshotExtentWriter : public chromeos_update_engine::ExtentWriter {
5255
};
5356

5457
} // namespace chromeos_update_engine
58+
59+
#endif

0 commit comments

Comments
 (0)