about summary refs log tree commit diff
path: root/src/libstore/store-api.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-06-18T14·20+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-06-18T14·20+0000
commitd3aa183beb774c20cb77052248cf45e684d134fb (patch)
treedff630ec4a8a0af08added558a1f6b753edfd5dd /src/libstore/store-api.cc
parenta8f3b02092fcc08fb25fb327d0188ffc888120bb (diff)
* Garbage collector: option `--max-freed' to stop after at least N
  bytes have been freed, `--max-links' to stop when the Nix store
  directory has fewer than N hard links (the latter being important
  for very large Nix stores on filesystems with a 32000 subdirectories
  limit).

Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r--src/libstore/store-api.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index 0d516c198d3b..ac31601bef77 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -2,10 +2,21 @@
 #include "globals.hh"
 #include "util.hh"
 
+#include <stdint.h>
+
 
 namespace nix {
 
 
+GCOptions::GCOptions()
+{
+    action = gcDeleteDead;
+    ignoreLiveness = false;
+    maxFreed = ULLONG_MAX;
+    maxLinks = 0;
+}
+
+
 bool StoreAPI::hasSubstitutes(const Path & path)
 {
     PathSet paths = querySubstitutablePaths();