]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- add isActive method to the Snapshot class 242/head
authorAleksey Novikov <shader@yandex.ru>
Wed, 18 May 2016 12:15:35 +0000 (15:15 +0300)
committerAleksey Novikov <shader@yandex.ru>
Wed, 18 May 2016 12:15:35 +0000 (15:15 +0300)
snapper/Snapshot.cc
snapper/Snapshot.h

index 38c3b01d3f4314d301e7f935135f851058524365..09449577f7b84d19e9e6d72bf7135b38d8b66dac 100644 (file)
@@ -147,6 +147,13 @@ namespace snapper
     }
 
 
+    bool
+    Snapshot::isActive() const
+    {
+       return !isCurrent() && snapper->getFilesystem()->isActive(num);
+    }
+
+
     void
     Snapshots::read()
     {
index fd35c248a1e972fb7b19f35f95be765423a1de59..d47010db6cb707b8fe1f278f15fbdd74e8436c4f 100644 (file)
@@ -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;