]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- renamed cleanup algorithm
authorArvin Schnell <aschnell@suse.de>
Fri, 25 Feb 2011 11:46:34 +0000 (12:46 +0100)
committerArvin Schnell <aschnell@suse.de>
Fri, 25 Feb 2011 11:46:34 +0000 (12:46 +0100)
snapper/Snapper.cc
snapper/Snapper.h
testsuite-real/common.cc
tools/daily.cc
tools/snapper.cc

index 29649768d8f10efb68f6e19e9e44fd59f72bcd1d..736fb960201afccb50cb26a82410161366aa090e 100644 (file)
@@ -209,9 +209,9 @@ namespace snapper
 
 
     bool
-    Snapper::doCleanupAmount()
+    Snapper::doCleanupNumber()
     {
-       size_t limit = 10;              // TODO
+       size_t limit = 50;              // TODO
 
        y2mil("limit:" << limit);
 
@@ -219,7 +219,7 @@ namespace snapper
 
        for (Snapshots::iterator it = snapshots.begin(); it != snapshots.end(); ++it)
        {
-           if (it->getCleanup() == "amount")
+           if (it->getCleanup() == "number")
                tmp.push_back(it);
        }
 
index 1e97bb996a3c082102a5ae432734fcecb011e009..f31e4ca57fcafdd3fee7ff1f3bee12af7745e291 100644 (file)
@@ -78,7 +78,7 @@ namespace snapper
 
        bool doRollback();
 
-       bool doCleanupAmount();
+       bool doCleanupNumber();
        bool doCleanupTimeline();
 
        void setCompareCallback(CompareCallback* p) { compare_callback = p; }
index 6737c5533136995695db095a503a585d0a4bc3db..3b6798c5a526286036338514d3c691676eaf5ee6 100644 (file)
@@ -43,7 +43,7 @@ void
 first_snapshot()
 {
     first = sh->createPreSnapshot("testsuite");
-    first->setCleanup("amount");
+    first->setCleanup("number");
 }
 
 
@@ -51,7 +51,7 @@ void
 second_snapshot()
 {
     second = sh->createPostSnapshot(first);
-    second->setCleanup("amount");
+    second->setCleanup("number");
 }
 
 
index ff634a8c7111a928b67f6c7566c580d5cbfba532..66ad07d5b60a69a443c68ca1e9cdf4413b9d8263 100644 (file)
@@ -25,7 +25,7 @@ main(int argc, char** argv)
 
     Snapper* sh = createSnapper(subvolume);
 
-    sh->doCleanupAmount();
+    sh->doCleanupNumber();
     sh->doCleanupTimeline();
 
     deleteSnapper(sh);
index 2df7a1f2dcffecc8fe7e50e8cde62647dbcda0f8..a5d6ec7524682525f7db828d7f2c4fff0d880b17 100644 (file)
@@ -443,9 +443,9 @@ command_cleanup()
 
     string cleanup = getopts.popArg();
 
-    if (cleanup == "amount")
+    if (cleanup == "number")
     {
-       sh->doCleanupAmount();
+       sh->doCleanupNumber();
     }
     else if (cleanup == "timeline")
     {