#include #include #include #include #include #include #include #include #if defined (HAVE_SYS_STATVFS_H) #include #else #include #endif #include #include #include void G_GNUC_INTERNAL _glibtop_freebsd_get_fsusage_read_write(glibtop *server, glibtop_fsusage *buf, const char *path); void G_GNUC_INTERNAL _glibtop_freebsd_get_fsusage_read_write(glibtop *server, glibtop_fsusage *buf, const char *path) { int result; #if defined (STAT_STATVFS) struct statvfs sfs; #else struct statfs sfs; #endif #if defined (STAT_STATVFS) result = statfs (path, &sfs); #else result = statfs (path, &sfs); #endif if (result == -1) { return; } buf->read = sfs.f_syncreads + sfs.f_asyncreads; buf->write = sfs.f_syncwrites + sfs.f_asyncwrites; buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE); }