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.
This commit is contained in:
Benoît Dejean
2004-09-22 17:38:18 +00:00
parent e830a8eeb6
commit 5d97c3fa5e
2 changed files with 13 additions and 10 deletions

View File

@@ -1,3 +1,10 @@
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.

View File

@@ -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 */