Merge "snapshot: helper to get access snapshot_state path" am: 34ad19f4c4

Change-Id: I7088d6cf474ec65522315ff11597941ded130f79
This commit is contained in:
Treehugger Robot 2020-02-17 12:44:04 +00:00
commit 054e278ab1
2 changed files with 8 additions and 0 deletions

View file

@ -395,6 +395,10 @@ class SnapshotManager final {
bool WriteSnapshotUpdateStatus(LockedFile* file, const SnapshotUpdateStatus& status);
std::string GetStateFilePath() const;
// Interact with /metadata/ota/merge_state.
// This file contains information related to the snapshot merge process.
std::string GetMergeStateFilePath() const;
// Helpers for merging.
bool SwitchSnapshotToMerge(LockedFile* lock, const std::string& name);
bool RewriteSnapshotDeviceTable(const std::string& dm_name);

View file

@ -1739,6 +1739,10 @@ std::string SnapshotManager::GetStateFilePath() const {
return metadata_dir_ + "/state"s;
}
std::string SnapshotManager::GetMergeStateFilePath() const {
return metadata_dir_ + "/merge_state"s;
}
std::string SnapshotManager::GetLockPath() const {
return metadata_dir_;
}