diff options
Diffstat (limited to 'src/sysinfo.cpp')
-rw-r--r-- | src/sysinfo.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sysinfo.cpp b/src/sysinfo.cpp index 5c40a2e..0290e9b 100644 --- a/src/sysinfo.cpp +++ b/src/sysinfo.cpp @@ -279,6 +279,14 @@ namespace { this->free_space_bytes = 0; for (guint i = 0; i != mountlist.number; ++i) { + if ((string(entries[i].mountdir).compare("/") == 0) && \ + (string(entries[i].type).compare("zfs") == 0)) { + // Root filesystem is ZFS based: Calculate usage based on "/". + glibtop_fsusage usage; + glibtop_get_fsusage(&usage, "/"); + this->free_space_bytes = usage.bavail * usage.block_size; + break; + } if (string(entries[i].devname).find("/dev/") != 0) continue; |