Fixed .block_size on Solaris.
* fsusage.c: (glibtop_get_fsusage_s): Fixed .block_size on Solaris.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
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>
|
2004-09-24 Benoît Dejean <tazforever@dlfp.org>
|
||||||
|
|
||||||
* Makefile.am:
|
* Makefile.am:
|
||||||
|
@@ -248,12 +248,18 @@ glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf,
|
|||||||
#endif /* STAT_STATFS4 */
|
#endif /* STAT_STATFS4 */
|
||||||
|
|
||||||
#ifdef STAT_STATVFS /* SVR4 */
|
#ifdef STAT_STATVFS /* SVR4 */
|
||||||
/* Linux */
|
/* Linux, Solaris */
|
||||||
|
|
||||||
if (statvfs (path, &fsd) < 0)
|
if (statvfs (path, &fsd) < 0)
|
||||||
return;
|
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;
|
buf->block_size = fsd.f_bsize;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* STAT_STATVFS */
|
#endif /* STAT_STATVFS */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user