fix(fs): Set bytes_avail

Refs #343
This commit is contained in:
Michael Carlberg 2017-01-17 15:20:46 +01:00
parent 132b832c52
commit 0f87d37137

View file

@ -99,6 +99,7 @@ namespace modules {
mount->bytes_total = buffer.f_bsize * buffer.f_blocks; mount->bytes_total = buffer.f_bsize * buffer.f_blocks;
mount->bytes_free = buffer.f_bsize * buffer.f_bfree; mount->bytes_free = buffer.f_bsize * buffer.f_bfree;
mount->bytes_used = mount->bytes_total - buffer.f_bsize * buffer.f_bavail; mount->bytes_used = mount->bytes_total - buffer.f_bsize * buffer.f_bavail;
mount->bytes_avail = buffer.f_bsize * buffer.f_bavail;
mount->percentage_free = math_util::percentage<double>(mount->bytes_avail, mount->bytes_total); mount->percentage_free = math_util::percentage<double>(mount->bytes_avail, mount->bytes_total);
mount->percentage_used = math_util::percentage<double>(mount->bytes_used, mount->bytes_total); mount->percentage_used = math_util::percentage<double>(mount->bytes_used, mount->bytes_total);