Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58ec6d18 authored by David Anderson's avatar David Anderson Committed by Automerger Merge Worker
Browse files

Merge "libsnapshot: Don't call RemoveAllSnapshots on normal boot." into main am: 0bb10989

parents 2e6da523 0bb10989
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -351,10 +351,15 @@ bool SnapshotManager::RemoveAllUpdateState(LockedFile* lock, const std::function

    LOG(INFO) << "Removing all update state.";

    if (ReadUpdateState(lock) != UpdateState::None) {
        // Only call this if we're actually cancelling an update. It's not
        // expected to yield anything otherwise, and firing up gsid on normal
        // boot is expensive.
        if (!RemoveAllSnapshots(lock)) {
            LOG(ERROR) << "Could not remove all snapshots";
            return false;
        }
    }

    // It's okay if these fail:
    // - For SnapshotBoot and Rollback, first-stage init performs a deeper check after