[libgtop] Fix filesystem read/write accounting on OpenBSD
- From: Jasper Lievisse Adriaanse <jasperla src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgtop] Fix filesystem read/write accounting on OpenBSD
- Date: Wed, 22 Jun 2011 15:24:52 +0000 (UTC)
commit 93829c8cbb6c719266dd522f7d1cf76afff0f4a8
Author: Jasper Lievisse Adriaanse <jasper humppa nl>
Date: Wed Jun 22 17:24:37 2011 +0200
Fix filesystem read/write accounting on OpenBSD
https://bugzilla.gnome.org/show_bug.cgi?id=652980
sysdeps/common/fsusage.c | 11 ++++++++++-
sysdeps/openbsd/fsusage.c | 6 +++---
2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/sysdeps/common/fsusage.c b/sysdeps/common/fsusage.c
index 1936da8..bfbbba7 100644
--- a/sysdeps/common/fsusage.c
+++ b/sysdeps/common/fsusage.c
@@ -149,6 +149,15 @@ _glibtop_freebsd_get_fsusage_read_write(glibtop *server,
#define _glibtop_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 */
#warning glibtop_get_fsusage .read .write are not implemented.
static inline void
@@ -270,7 +279,7 @@ glibtop_get_fsusage_s (glibtop *server, glibtop_fsusage *buf,
return;
#if (defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)) \
- || defined(__FreeBSD__)
+ || defined(__FreeBSD__) || defined(__OpenBSD__)
/* Solaris but not SunOS and FreeBSD */
buf->block_size = fsd.f_frsize;
#else
diff --git a/sysdeps/openbsd/fsusage.c b/sysdeps/openbsd/fsusage.c
index 9015f9f..1bf1c63 100644
--- a/sysdeps/openbsd/fsusage.c
+++ b/sysdeps/openbsd/fsusage.c
@@ -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>
@@ -31,12 +31,12 @@
#include <stdlib.h>
void
-_glibtop_bsd_get_fsusage_read_write(glibtop *server,
+_glibtop_openbsd_get_fsusage_read_write(glibtop *server,
glibtop_fsusage *buf,
const char *path);
void
-_glibtop_bsd_get_fsusage_read_write(glibtop *server,
+_glibtop_openbsd_get_fsusage_read_write(glibtop *server,
glibtop_fsusage *buf,
const char *path)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]