summaryrefslogtreecommitdiff
path: root/src/print_disk_info.c
diff options
context:
space:
mode:
authorMirko Augsburger <git+taschenrechner@mist.name>2010-06-25 01:19:09 +0200
committerMichael Stapelberg <michael@stapelberg.de>2010-06-25 01:24:26 +0200
commit28ba2ae8920ed5a020d51d51ee75dd8899aa0df1 (patch)
treef10adcd7f1bd11c0a4b50ca7dfff9b2a548bf6a4 /src/print_disk_info.c
parent71f71660322b12b8602f5979222d280b7db333bd (diff)
disk_info: implement %avail
Diffstat (limited to 'src/print_disk_info.c')
-rw-r--r--src/print_disk_info.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/print_disk_info.c b/src/print_disk_info.c
index 3bd2bf8..b9ec84b 100644
--- a/src/print_disk_info.c
+++ b/src/print_disk_info.c
@@ -64,5 +64,10 @@ void print_disk_info(const char *path, const char *format) {
print_bytes_human((uint64_t)buf.f_bsize * (uint64_t)buf.f_blocks);
walk += strlen("total");
}
+
+ if (BEGINS_WITH(walk+1, "avail")) {
+ print_bytes_human((uint64_t)buf.f_bsize * (uint64_t)buf.f_bavail);
+ walk += strlen("avail");
+ }
}
}