Added
Link Here
|
1 |
--- platform/FreeBSD/sm_io.c.orig Mon Jul 25 12:08:47 2005 |
2 |
+++ platform/FreeBSD/sm_io.c Mon Jul 25 12:12:27 2005 |
3 |
@@ -81,7 +81,7 @@ |
4 |
void |
5 |
gets_io() |
6 |
{ |
7 |
-#if DEVSTAT_USER_API_VER == 5 |
8 |
+#if DEVSTAT_USER_API_VER == 5 || DEVSTAT_USER_API_VER == 6 |
9 |
io_numdevs = devstat_getnumdevs(NULL); |
10 |
#else |
11 |
io_numdevs = getnumdevs(); |
12 |
@@ -98,7 +98,7 @@ |
13 |
/* clear the devinfo struct, as getdevs expects it to be all zeroes */ |
14 |
bzero(io_stats.dinfo, sizeof(struct devinfo)); |
15 |
|
16 |
-#if DEVSTAT_USER_API_VER == 5 |
17 |
+#if DEVSTAT_USER_API_VER == 5 || DEVSTAT_USER_API_VER == 6 |
18 |
devstat_getdevs(NULL, &io_stats); |
19 |
#else |
20 |
getdevs(&io_stats); |
21 |
@@ -118,7 +118,7 @@ |
22 |
strlen(ds->device_name) < strlen(dev) && |
23 |
isdigit(dev[strlen(ds->device_name)]) && |
24 |
atoi(&dev[strlen(ds->device_name)]) == ds->unit_number) { |
25 |
-#if DEVSTAT_USER_API_VER == 5 |
26 |
+#if DEVSTAT_USER_API_VER == 5 || DEVSTAT_USER_API_VER == 6 |
27 |
return snpack(symon_buf, maxlen, dev, MT_IO2, |
28 |
ds->operations[DEVSTAT_READ], |
29 |
ds->operations[DEVSTAT_WRITE], |