From: Dave Reisner Date: Mon, 20 Aug 2012 10:06:17 +0000 (-0400) Subject: findmnt: use st.st_bavail for available column X-Git-Tag: v2.22~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed6c8c1b61bf87e0fa6d78da405a052a0e46cb10;p=thirdparty%2Futil-linux.git findmnt: use st.st_bavail for available column This matches more closely with what 'df -h' reports as space available. Any remaining discrepancy between these 2 tools is a result of precision and choices in rounding. Signed-off-by: Dave Reisner --- diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c index db40323e36..853fae071e 100644 --- a/misc-utils/findmnt.c +++ b/misc-utils/findmnt.c @@ -374,7 +374,7 @@ static const char *get_vfs_attr(struct libmnt_fs *fs, int sizetype) vfs_attr = buf.f_frsize * buf.f_blocks; break; case COL_AVAIL: - vfs_attr = buf.f_frsize * buf.f_bfree; + vfs_attr = buf.f_frsize * buf.f_bavail; break; case COL_USED: vfs_attr = buf.f_frsize * (buf.f_blocks - buf.f_bfree);