Various FreeBSD and kFreeBSD updates. Patch by Roy Marples
2007-01-31 Benoît Dejean <benoit@placenet.org> * fsusage.c: (_glibtop_freebsd_get_fsusage_read_write): * netload.c: (glibtop_get_netload_p): * prockernel.c: (glibtop_get_proc_kernel_p): * procmap.c: (glibtop_get_proc_map_p): * proctime.c: * siglist.c: * /libgtop-sysdeps.m4: Various FreeBSD and kFreeBSD updates. Patch by Roy Marples <uberlord@gentoo.org>. Reviewed by Petr Salinger <Petr.Salinger@seznam.cz>. Closes #387200. svn path=/trunk/; revision=2550
This commit is contained in:
committed by
Benoît Dejean
parent
3d06443c2c
commit
c6a7459bc9
@@ -1,4 +1,11 @@
|
||||
#include <config.h>
|
||||
|
||||
/* Although FreeBSD ships with statvfs it seems incomplete, so prefer statfs */
|
||||
#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
|
||||
#undef HAVE_SYS_STATVFS_H
|
||||
#undef STAT_STATVFS
|
||||
#endif
|
||||
|
||||
#include <glibtop.h>
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/fsusage.h>
|
||||
@@ -46,9 +53,8 @@ _glibtop_freebsd_get_fsusage_read_write(glibtop *server,
|
||||
if (result == -1) {
|
||||
return;
|
||||
}
|
||||
#if !defined(__FreeBSD_kernel__)
|
||||
|
||||
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user