* [PATCH] findmnt: use st.st_bavail for available column
@ 2012-08-20 10:06 Dave Reisner
2012-09-04 10:44 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Dave Reisner @ 2012-08-20 10:06 UTC (permalink / raw)
To: util-linux; +Cc: Dave Reisner
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 <dreisner@archlinux.org>
---
misc-utils/findmnt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c
index db40323..853fae0 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);
--
1.7.11.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] findmnt: use st.st_bavail for available column
2012-08-20 10:06 [PATCH] findmnt: use st.st_bavail for available column Dave Reisner
@ 2012-09-04 10:44 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2012-09-04 10:44 UTC (permalink / raw)
To: Dave Reisner; +Cc: util-linux
On Mon, Aug 20, 2012 at 06:06:17AM -0400, Dave Reisner wrote:
> misc-utils/findmnt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-04 10:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-20 10:06 [PATCH] findmnt: use st.st_bavail for available column Dave Reisner
2012-09-04 10:44 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).