From 13493ef97c01a9839c340cbe4e99baae65b20e15 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 21 May 2015 15:21:38 +0200 Subject: nix-collect-garbage: Call collectGarbage() internally --- src/nix-store/nix-store.cc | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/nix-store') diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 506c1a397b55..ff15875e7090 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; -- cgit 1.4.1