diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-06-18T09·34+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-06-18T09·34+0000 |
commit | a72709afd8ffe35613a6bacd698a36395e095a48 (patch) | |
tree | 2f549bafbed92a53bd6faea1da43667307af7593 /src/libstore/build.cc | |
parent | 934c58aa381f5eacc86304ba7f5c6775ff456cd5 (diff) |
* Some refactoring: put the GC options / results in separate structs.
* The garbage collector now also prints the number of blocks freed.
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r-- | src/libstore/build.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 0664a118a00f..1d624723f92b 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -578,17 +578,17 @@ void getOwnership(const Path & path) void deletePathWrapped(const Path & path, - unsigned long long & bytesFreed) + unsigned long long & bytesFreed, unsigned long long & blocksFreed) { try { /* First try to delete it ourselves. */ - deletePath(path, bytesFreed); + deletePath(path, bytesFreed, blocksFreed); } catch (SysError & e) { /* If this failed due to a permission error, then try it with the setuid helper. */ if (haveBuildUsers() && !amPrivileged()) { getOwnership(path); - deletePath(path, bytesFreed); + deletePath(path, bytesFreed, blocksFreed); } else throw; } @@ -597,8 +597,8 @@ void deletePathWrapped(const Path & path, void deletePathWrapped(const Path & path) { - unsigned long long dummy; - deletePathWrapped(path, dummy); + unsigned long long dummy1, dummy2; + deletePathWrapped(path, dummy1, dummy2); } |