Follow devstat API change on 5-CURRENT.

This commit is contained in:
Hajimu UMEMOTO 2003-03-23 05:26:37 +00:00
parent 45994f3bcf
commit 92e5c09d57
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=77201

View File

@ -1,7 +1,7 @@
Index: src/disk.c
diff -u src/disk.c.orig src/disk.c
--- src/disk.c.orig Mon Jul 1 11:19:47 2002
+++ src/disk.c Thu Feb 20 19:42:04 2003
+++ src/disk.c Sat Mar 22 20:03:22 2003
@@ -70,7 +70,11 @@
#if defined(__FreeBSD__)
@ -14,3 +14,18 @@ diff -u src/disk.c.orig src/disk.c
#if __FreeBSD_version >= 300000
#include <devstat.h>
static struct statinfo statinfo_cur;
@@ -161,6 +165,14 @@
using_DiskN_names = TRUE;
}
#else
+#if __FreeBSD_version >= 500107
+#define getdevs(stats) devstat_getdevs(NULL, stats)
+#define getnumdevs() devstat_getnumdevs(NULL)
+#define selectdevs devstat_selectdevs
+#define bytes_read bytes[DEVSTAT_READ]
+#define bytes_written bytes[DEVSTAT_WRITE]
+#endif
+
static void
read_freebsd_disk()
{