diff options
author | Benoît Dejean <bdejean@src.gnome.org> | 2004-09-22 17:38:18 +0000 |
---|---|---|
committer | Benoît Dejean <bdejean@src.gnome.org> | 2004-09-22 17:38:18 +0000 |
commit | 5d97c3fa5ef6596d48ac6e2937682c669ae37377 (patch) | |
tree | 671553d1c0e11e8a1caa6e2b84177d6ea91ac30a | |
parent | e830a8eeb6b0ed75ec91f6477576b6530b5a338a (diff) | |
download | libgtop-5d97c3fa5ef6596d48ac6e2937682c669ae37377.tar.gz |
Linux: Sanitize. Removed calls to obfuscated PROPAGATE_ALL_ONES(x) which
* fsusage.c: (glibtop_get_fsusage_s): Linux: Sanitize. Removed calls
to obfuscated PROPAGATE_ALL_ONES(x) which seems to return unpredictable
values on some arch (e.g sparc).
Closes #153141.
-rw-r--r-- | sysdeps/common/ChangeLog | 7 | ||||
-rw-r--r-- | sysdeps/common/fsusage.c | 16 |
2 files changed, 13 insertions, 10 deletions
diff --git a/sysdeps/common/ChangeLog b/sysdeps/common/ChangeLog index ade297ac..a8e5b6fe 100644 --- a/sysdeps/common/ChangeLog +++ b/sysdeps/common/ChangeLog @@ -1,5 +1,12 @@ 2004-09-22 Benoît Dejean <tazforever@dlfp.org> + * fsusage.c: (glibtop_get_fsusage_s): Linux: Sanitize. Removed calls + to obfuscated PROPAGATE_ALL_ONES(x) which seems to return unpredictable + values on some arch (e.g sparc). + Closes #153141. + +2004-09-22 Benoît Dejean <tazforever@dlfp.org> + * mountlist.c: (ignore_mount_entry): Added mntfs to ignore list. 2004-09-21 Benoît Dejean <tazforever@dlfp.org> diff --git a/sysdeps/common/fsusage.c b/sysdeps/common/fsusage.c index abcd2bdf..88a9090f 100644 --- a/sysdeps/common/fsusage.c +++ b/sysdeps/common/fsusage.c @@ -253,10 +253,7 @@ glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf, if (statvfs (path, &fsd) < 0) return; - /* f_frsize isn't guaranteed to be supported. */ - buf->block_size = (fsd.f_frsize - ? PROPAGATE_ALL_ONES (fsd.f_frsize) - : PROPAGATE_ALL_ONES (fsd.f_bsize)); + buf->block_size = fsd.f_bsize; #endif /* STAT_STATVFS */ @@ -264,12 +261,11 @@ glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf, /* !Ultrix && !SVR2 */ /* Linux */ - buf->blocks = PROPAGATE_ALL_ONES (fsd.f_blocks); - buf->bfree = PROPAGATE_ALL_ONES (fsd.f_bfree); - buf->bavail = PROPAGATE_TOP_BIT (fsd.f_bavail); - /* buf->bavail_top_bit_set = EXTRACT_TOP_BIT (fsd.f_bavail) != 0; */ - buf->files = PROPAGATE_ALL_ONES (fsd.f_files); - buf->ffree = PROPAGATE_ALL_ONES (fsd.f_ffree); + buf->blocks = fsd.f_blocks; + buf->bfree = fsd.f_bfree; + buf->bavail = fsd.f_bavail; + buf->files = fsd.f_files; + buf->ffree = fsd.f_ffree; #endif /* not STAT_STATFS2_FS_DATA && not STAT_READ_FILSYS */ |