[libgtop] Set the FSUSAGE_(READ|WRITE) flags only we managed to get something. Currently, it doesn't seem to w
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgtop] Set the FSUSAGE_(READ|WRITE) flags only we managed to get something. Currently, it doesn't seem to w
- Date: Thu, 25 Jun 2015 23:58:36 +0000 (UTC)
commit c7f7e5a1c61cb47ccc777d5d77dd87c20f8a2a3a
Author: Benoit Dejean <bdejean gmail com>
Date: Sat Feb 28 03:39:22 2015 +0100
Set the FSUSAGE_(READ|WRITE) flags only we managed to get something. Currently, it doesn't seem to work
on ZFS.
sysdeps/freebsd/fsusage.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/sysdeps/freebsd/fsusage.c b/sysdeps/freebsd/fsusage.c
index 88b9b39..b6f87a0 100644
--- a/sysdeps/freebsd/fsusage.c
+++ b/sysdeps/freebsd/fsusage.c
@@ -132,7 +132,9 @@ _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
- buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
+ if (buf->read || buf->write) {
+ buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
+ }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]