diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-01 22:34:46 -0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-01 22:34:46 -0400 |
commit | 01d56c1eeca497de247413a64a544605c53d9d41 (patch) | |
tree | 11f42a290a031e6a23781c379f7b34fb6bbc0ff3 /src/nix-store | |
parent | 967d066d8e452e59507ebae7585d6f34a4edf687 (diff) |
Drop the block count in the garbage collector
Diffstat (limited to 'src/nix-store')
-rw-r--r-- | src/nix-store/nix-store.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 9a675fcd5..c182dbe49 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -544,10 +544,9 @@ static void opCheckValidity(Strings opFlags, Strings opArgs) } -static string showBytes(unsigned long long bytes, unsigned long long blocks) +static string showBytes(unsigned long long bytes) { - return (format("%d bytes (%.2f MiB, %d blocks)") - % bytes % (bytes / (1024.0 * 1024.0)) % blocks).str(); + return (format("%.2f MiB") % (bytes / (1024.0 * 1024.0))).str(); } @@ -562,7 +561,7 @@ struct PrintFreed if (show) cout << format("%1% store paths deleted, %2% freed\n") % results.paths.size() - % showBytes(results.bytesFreed, results.blocksFreed); + % showBytes(results.bytesFreed); } }; @@ -735,7 +734,7 @@ static void showOptimiseStats(OptimiseStats & stats) { printMsg(lvlError, format("%1% freed by hard-linking %2% files; there are %3% files with equal contents out of %4% files in total") - % showBytes(stats.bytesFreed, stats.blocksFreed) + % showBytes(stats.bytesFreed) % stats.filesLinked % stats.sameContents % stats.totalFiles); |