about summary refs log tree commit diff
path: root/src/libutil/util.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-06-18T09·34+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-06-18T09·34+0000
commita72709afd8ffe35613a6bacd698a36395e095a48 (patch)
tree2f549bafbed92a53bd6faea1da43667307af7593 /src/libutil/util.hh
parent934c58aa381f5eacc86304ba7f5c6775ff456cd5 (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/libutil/util.hh')
-rw-r--r--src/libutil/util.hh8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh
index d52ab3e4d920..d1e30fa6b9e3 100644
--- a/src/libutil/util.hh
+++ b/src/libutil/util.hh
@@ -61,14 +61,16 @@ string readFile(const Path & path);
 void writeFile(const Path & path, const string & s);
 
 /* Compute the sum of the sizes of all files in `path'. */
-unsigned long long computePathSize(const Path & path);
+void computePathSize(const Path & path,
+    unsigned long long & bytes, unsigned long long & blocks);
 
 /* Delete a path; i.e., in the case of a directory, it is deleted
    recursively.  Don't use this at home, kids.  The second variant
-   returns the number of bytes freed. */
+   returns the number of bytes and blocks freed. */
 void deletePath(const Path & path);
 
-void deletePath(const Path & path, unsigned long long & bytesFreed);
+void deletePath(const Path & path, unsigned long long & bytesFreed,
+    unsigned long long & blocksFreed);
 
 /* Make a path read-only recursively. */
 void makePathReadOnly(const Path & path);