aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 9e7142e01..f07e99885 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -1641,4 +1641,11 @@ AutoCloseFD createUnixDomainSocket(const Path & path, mode_t mode)
return fdSocket;
}
+
+string showBytes(uint64_t bytes)
+{
+ return fmt("%.2f MiB", bytes / (1024.0 * 1024.0));
+}
+
+
}