From 28ba2ae8920ed5a020d51d51ee75dd8899aa0df1 Mon Sep 17 00:00:00 2001 From: Mirko Augsburger Date: Fri, 25 Jun 2010 01:19:09 +0200 Subject: disk_info: implement %avail --- src/print_disk_info.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/print_disk_info.c') 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"); + } } } -- cgit v1.2.3