summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authordyoung <dyoung@NetBSD.org>2009-11-05 17:52:32 +0000
committerdyoung <dyoung@NetBSD.org>2009-11-05 17:52:32 +0000
commitc6acecde0aeac88c1ed236a36fc59e6324e97777 (patch)
tree08961ac3e9dcfc97cbf5d2a0b6d2c039d8591ce7 /sys/dev/raidframe
parent2e43373a9609d2ff17bb1a932f72297d6e8d6abe (diff)
Use deviter(9) instead of accessing alldevs directly. Compile-tested,
only.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c
index 8b87a12a06f..1e55ec04caa 100644
--- a/sys/dev/raidframe/rf_netbsdkintf.c
+++ b/sys/dev/raidframe/rf_netbsdkintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.267 2009/10/13 22:46:28 pooka Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.268 2009/11/05 17:52:32 dyoung Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -139,7 +139,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.267 2009/10/13 22:46:28 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.268 2009/11/05 17:52:32 dyoung Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -2871,6 +2871,7 @@ rf_find_raid_components(void)
struct vnode *vp;
struct disklabel label;
device_t dv;
+ deviter_t di;
dev_t dev;
int bmajor, bminor, wedge;
int error;
@@ -2883,8 +2884,8 @@ rf_find_raid_components(void)
/* we begin by trolling through *all* the devices on the system */
- for (dv = alldevs.tqh_first; dv != NULL;
- dv = dv->dv_list.tqe_next) {
+ for (dv = deviter_first(&di, DEVITER_F_ROOT_FIRST); dv != NULL;
+ dv = deviter_next(&di)) {
/* we are only interested in disks... */
if (device_class(dv) != DV_DISK)
@@ -3005,6 +3006,7 @@ rf_find_raid_components(void)
label.d_partitions[i].p_size);
}
}
+ deviter_release(&di);
return ac_list;
}