summaryrefslogtreecommitdiffstats
path: root/sys/dev/softraid.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2009-10-29 15:21:31 +0000
committerjsing <jsing@openbsd.org>2009-10-29 15:21:31 +0000
commitdea7e695fa82f6166e5b30a35f2de9634c58c8ef (patch)
tree9e670743b38b492b327bb841bc46086878c8929a /sys/dev/softraid.c
parentadd isp(4), but disable it since on most machines the pci bus is earlier (diff)
downloadwireguard-openbsd-dea7e695fa82f6166e5b30a35f2de9634c58c8ef.tar.xz
wireguard-openbsd-dea7e695fa82f6166e5b30a35f2de9634c58c8ef.zip
When probing devices at boot, compare against the full device driver name
rather than the start of the device name. Also, be inclusive with devices probed rather than exclusive - this means we now only look for RAID partitions on sd(4) and wd(4) devices. prodded by deraadt@ ok marco@ deraadt@
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r--sys/dev/softraid.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index 75b2a73d1dd..d54e27078ad 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.176 2009/10/28 15:22:23 marco Exp $ */
+/* $OpenBSD: softraid.c,v 1.177 2009/10/29 15:21:31 jsing Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -1010,10 +1010,9 @@ sr_boot_assembly(struct sr_softc *sc)
if (dv->dv_class != DV_DISK)
continue;
- /* XXX is there a better way of excluding some devices? */
- if (!strncmp(dv->dv_xname, "fd", 2) ||
- !strncmp(dv->dv_xname, "cd", 2) ||
- !strncmp(dv->dv_xname, "rx", 2))
+ /* Only check sd(4) and wd(4) devices. */
+ if (strcmp(dv->dv_cfdata->cf_driver->cd_name, "sd") &&
+ strcmp(dv->dv_cfdata->cf_driver->cd_name, "wd"))
continue;
/* native softraid uses partitions */