Fix filesystem read/write accounting on OpenBSD
https://bugzilla.gnome.org/show_bug.cgi?id=652980
This commit is contained in:
@@ -149,6 +149,15 @@ _glibtop_freebsd_get_fsusage_read_write(glibtop *server,
|
|||||||
#define _glibtop_get_fsusage_read_write(S, B, P) \
|
#define _glibtop_get_fsusage_read_write(S, B, P) \
|
||||||
_glibtop_freebsd_get_fsusage_read_write(S, B, P)
|
_glibtop_freebsd_get_fsusage_read_write(S, B, P)
|
||||||
|
|
||||||
|
#elif defined(__OpenBSD__)
|
||||||
|
void
|
||||||
|
_glibtop_openbsd_get_fsusage_read_write(glibtop *server,
|
||||||
|
glibtop_fsusage *buf,
|
||||||
|
const char *path);
|
||||||
|
|
||||||
|
#define _glibtop_get_fsusage_read_write(S, B, P) \
|
||||||
|
_glibtop_openbsd_get_fsusage_read_write(S, B, P)
|
||||||
|
|
||||||
#else /* default fallback */
|
#else /* default fallback */
|
||||||
#warning glibtop_get_fsusage .read .write are not implemented.
|
#warning glibtop_get_fsusage .read .write are not implemented.
|
||||||
static inline void
|
static inline void
|
||||||
@@ -270,7 +279,7 @@ glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
#if (defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)) \
|
#if (defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)) \
|
||||||
|| defined(__FreeBSD__)
|
|| defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||||
/* Solaris but not SunOS and FreeBSD */
|
/* Solaris but not SunOS and FreeBSD */
|
||||||
buf->block_size = fsd.f_frsize;
|
buf->block_size = fsd.f_frsize;
|
||||||
#else
|
#else
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: fsusage.c,v 1.3 2011/05/23 19:35:53 jasper Exp $ */
|
/* $OpenBSD: fsusage.c,v 1.4 2011/05/31 19:25:31 jasper Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -31,12 +31,12 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
void
|
void
|
||||||
_glibtop_bsd_get_fsusage_read_write(glibtop *server,
|
_glibtop_openbsd_get_fsusage_read_write(glibtop *server,
|
||||||
glibtop_fsusage *buf,
|
glibtop_fsusage *buf,
|
||||||
const char *path);
|
const char *path);
|
||||||
|
|
||||||
void
|
void
|
||||||
_glibtop_bsd_get_fsusage_read_write(glibtop *server,
|
_glibtop_openbsd_get_fsusage_read_write(glibtop *server,
|
||||||
glibtop_fsusage *buf,
|
glibtop_fsusage *buf,
|
||||||
const char *path)
|
const char *path)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user