1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-21 01:39:36 +01:00

treewide: replace manual MiB calculations with renderSize

This commit is contained in:
Marcel 2025-10-27 01:21:02 +01:00
parent f234633e27
commit 584a8e8a00
No known key found for this signature in database
GPG key ID: 446F3B093DF81C6A
3 changed files with 13 additions and 11 deletions

View file

@ -5,6 +5,7 @@
#include "nix/util/finally.hh"
#include "nix/util/unix-domain-socket.hh"
#include "nix/util/signals.hh"
#include "nix/util/util.hh"
#include "nix/store/posix-fs-canonicalise.hh"
#include "store-config-private.hh"
@ -906,9 +907,7 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
#endif
;
printInfo(
"note: currently hard linking saves %.2f MiB",
((unsharedSize - actualSize - overhead) / (1024.0 * 1024.0)));
printInfo("note: currently hard linking saves %s", renderSize(unsharedSize - actualSize - overhead));
}
/* While we're at it, vacuum the database. */