From 6b0d5b15f00eaf392c764609b8f12658a4666dd1 Mon Sep 17 00:00:00 2001 From: Aleksey Novikov Date: Wed, 18 May 2016 15:15:35 +0300 Subject: [PATCH] - add isActive method to the Snapshot class --- snapper/Snapshot.cc | 7 +++++++ snapper/Snapshot.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/snapper/Snapshot.cc b/snapper/Snapshot.cc index 38c3b01d..09449577 100644 --- a/snapper/Snapshot.cc +++ b/snapper/Snapshot.cc @@ -147,6 +147,13 @@ namespace snapper } + bool + Snapshot::isActive() const + { + return !isCurrent() && snapper->getFilesystem()->isActive(num); + } + + void Snapshots::read() { diff --git a/snapper/Snapshot.h b/snapper/Snapshot.h index fd35c248..d47010db 100644 --- a/snapper/Snapshot.h +++ b/snapper/Snapshot.h @@ -107,6 +107,8 @@ namespace snapper bool isDefault() const; void setDefault() const; + bool isActive() const; + void mountFilesystemSnapshot(bool user_request) const; void umountFilesystemSnapshot(bool user_request) const; void handleUmountFilesystemSnapshot() const; -- 2.47.3