From: Aleksey Novikov Date: Wed, 18 May 2016 12:15:35 +0000 (+0300) Subject: - add isActive method to the Snapshot class X-Git-Tag: v0.3.3~1^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=refs%2Fpull%2F242%2Fhead;p=thirdparty%2Fsnapper.git - add isActive method to the Snapshot class --- 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;