libsnapshot: Cleanup temp metadata during rollback
Bug: 380471512 Test: Test rollback and check metadata is cleared Change-Id: I4ebd5d9842409fa32c58bb482ffc0066817a5a05 Signed-off-by: Akilesh Kailash <akailash@google.com>
This commit is contained in:
parent
db80953238
commit
00a32314ac
1 changed files with 3 additions and 0 deletions
|
|
@ -2404,6 +2404,9 @@ bool SnapshotManager::NeedSnapshotsInFirstStageMount() {
|
|||
PLOG(ERROR) << "Unable to write rollback indicator: " << path;
|
||||
} else {
|
||||
LOG(INFO) << "Rollback detected, writing rollback indicator to " << path;
|
||||
if (device_->IsTempMetadata()) {
|
||||
CleanupScratchOtaMetadataIfPresent();
|
||||
}
|
||||
}
|
||||
}
|
||||
LOG(INFO) << "Not booting from new slot. Will not mount snapshots.";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue