Set the FSUSAGE_(READ|WRITE) flags only we managed to get something. Currently, it doesn't seem to work on ZFS.

This commit is contained in:
Benoit Dejean
2015-02-28 03:39:22 +01:00
committed by Robert Roth
parent e2348c24a0
commit c7f7e5a1c6

View File

@@ -132,8 +132,10 @@ _glibtop_get_fsusage_read_write (glibtop *server, glibtop_fsusage *buf, const ch
buf->read = sfs.f_syncreads + sfs.f_asyncreads;
buf->write = sfs.f_syncwrites + sfs.f_asyncwrites;
#endif
if (buf->read || buf->write) {
buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
}
}
void
glibtop_get_fsusage_s(glibtop *server, glibtop_fsusage *buf, const char *path)