summaryrefslogtreecommitdiff
path: root/nix/libstore/gc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'nix/libstore/gc.cc')
-rw-r--r--nix/libstore/gc.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/nix/libstore/gc.cc b/nix/libstore/gc.cc
index 1766a68412..08638b5115 100644
--- a/nix/libstore/gc.cc
+++ b/nix/libstore/gc.cc
@@ -433,8 +433,7 @@ void LocalStore::deletePathRecursive(GCState & state, const Path & path)
printMsg(lvlInfo, format("[%1%%%] deleting '%2%'") % percentage % path);
} else {
auto freed = state.results.bytesFreed + state.bytesInvalidated;
- freed /= 1024ULL * 1024ULL;
- printMsg(lvlInfo, format("[%1% MiB] deleting '%2%'") % freed % path);
+ printMsg(lvlInfo, format("[%1%] deleting '%2%'") % showBytes(freed) % path);
}
state.results.paths.insert(path);
@@ -629,9 +628,9 @@ void LocalStore::removeUnusedLinks(const GCState & state)
if (stat(linksDir.c_str(), &st) == -1)
throw SysError(format("statting `%1%'") % linksDir);
long long overhead = st.st_size;
+ long long freedbytes = (unsharedSize - actualSize - overhead);
- printMsg(lvlInfo, format("note: currently hard linking saves %.2f MiB")
- % ((unsharedSize - actualSize - overhead) / (1024.0 * 1024.0)));
+ printMsg(lvlInfo, format("note: currently hard linking saves %1%") % showBytes(freedbytes));
}