diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2009-10-29 15:21:32 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2009-10-29 15:21:32 +0000 |
commit | b6910f9f2e6b3f2c84c58f3b6f54ac8c3e14946f (patch) | |
tree | 4d624298ab107766f83e2039c5083b00af5b77f5 /sys/dev/softraid.c | |
parent | e92a14b8b37983f1c635686651a8b3e35943bf7d (diff) |
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.c | 9 |
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 */ |