aboutsummaryrefslogtreecommitdiff
path: root/src/nix-store/nix-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-05-21 15:21:38 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-05-21 15:21:38 +0200
commit13493ef97c01a9839c340cbe4e99baae65b20e15 (patch)
treef1c769d4b2fc967265cf6ac0488dfdcd165ba502 /src/nix-store/nix-store.cc
parent4441e4cc13ded59e1a57c3d47e7920dd6a3053fa (diff)
nix-collect-garbage: Call collectGarbage() internally
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r--src/nix-store/nix-store.cc22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 506c1a397..ff15875e7 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -625,28 +625,6 @@ static void opCheckValidity(Strings opFlags, Strings opArgs)
}
-static string showBytes(unsigned long long bytes)
-{
- return (format("%.2f MiB") % (bytes / (1024.0 * 1024.0))).str();
-}
-
-
-struct PrintFreed
-{
- bool show;
- const GCResults & results;
- PrintFreed(bool show, const GCResults & results)
- : show(show), results(results) { }
- ~PrintFreed()
- {
- if (show)
- cout << format("%1% store paths deleted, %2% freed\n")
- % results.paths.size()
- % showBytes(results.bytesFreed);
- }
-};
-
-
static void opGC(Strings opFlags, Strings opArgs)
{
bool printRoots = false;