From 738a94b7985dabbcc091f130fcc28f3fa9bec8b3 Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Thu, 20 Feb 2020 17:56:28 -0800 Subject: [PATCH] libsnapshot: dump rollback indicator Test: snapshotctl dump Bug: 149956852 Change-Id: Ib0308ab75d6dce4047b46d06cece95eed23620a9 --- fs_mgr/libsnapshot/snapshot.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs_mgr/libsnapshot/snapshot.cpp b/fs_mgr/libsnapshot/snapshot.cpp index 2fe06fb22..187f24cd0 100644 --- a/fs_mgr/libsnapshot/snapshot.cpp +++ b/fs_mgr/libsnapshot/snapshot.cpp @@ -2352,6 +2352,9 @@ bool SnapshotManager::Dump(std::ostream& os) { ss << "Current slot: " << device_->GetSlotSuffix() << std::endl; ss << "Boot indicator: booting from " << GetCurrentSlot() << " slot" << std::endl; + ss << "Rollback indicator: " + << (access(GetRollbackIndicatorPath().c_str(), F_OK) == 0 ? "exists" : strerror(errno)) + << std::endl; bool ok = true; std::vector snapshots;