diff options
author | Benoît Dejean <bdejean@src.gnome.org> | 2004-09-24 21:26:34 +0000 |
---|---|---|
committer | Benoît Dejean <bdejean@src.gnome.org> | 2004-09-24 21:26:34 +0000 |
commit | d0833edb6656d193fe834d1f520ce25a80d337ff (patch) | |
tree | e36fdcf2387e7315b608aa074b678aa88d6e61b8 | |
parent | 9aae957919df6397ab8db9bbc1dd6cdc7565f589 (diff) | |
download | libgtop-d0833edb6656d193fe834d1f520ce25a80d337ff.tar.gz |
Fixed .block_size on Solaris.
* fsusage.c: (glibtop_get_fsusage_s): Fixed .block_size on Solaris.
-rw-r--r-- | sysdeps/common/ChangeLog | 4 | ||||
-rw-r--r-- | sysdeps/common/fsusage.c | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/sysdeps/common/ChangeLog b/sysdeps/common/ChangeLog index fd270913..db21dfdb 100644 --- a/sysdeps/common/ChangeLog +++ b/sysdeps/common/ChangeLog @@ -1,5 +1,9 @@ 2004-09-24 Benoît Dejean <tazforever@dlfp.org> + * fsusage.c: (glibtop_get_fsusage_s): Fixed .block_size on Solaris. + +2004-09-24 Benoît Dejean <tazforever@dlfp.org> + * Makefile.am: * mountlist.c: * mountlist.h: Removed mountlist.h. diff --git a/sysdeps/common/fsusage.c b/sysdeps/common/fsusage.c index 88a9090f..cb8b5b28 100644 --- a/sysdeps/common/fsusage.c +++ b/sysdeps/common/fsusage.c @@ -248,12 +248,18 @@ glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf, #endif /* STAT_STATFS4 */ #ifdef STAT_STATVFS /* SVR4 */ - /* Linux */ + /* Linux, Solaris */ if (statvfs (path, &fsd) < 0) return; +#if (defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)) + /* Solaris but not SunOS */ + buf->block_size = fsd.f_frsize; +#else + /* else, including Linux */ buf->block_size = fsd.f_bsize; +#endif #endif /* STAT_STATVFS */ |