summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2007-05-27 00:10:48 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2007-05-27 00:10:48 +0000
commit5293af8d1b432294581be4926bcf80dee0536a02 (patch)
treef2fe5406a277d801bd5a4d92f139ca772691f3ca /sys
parent435edddeffe684f6de6ef484c40c92b5ab0d8632 (diff)
hack to not open cd & fd devices since they complain at boot time when there
is no media in them. ok tedu
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/softraid.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index a21f2737425..574b2237aa6 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.48 2007/05/26 23:59:09 marco Exp $ */
+/* $OpenBSD: softraid.c,v 1.49 2007/05/27 00:10:47 marco Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
*
@@ -169,8 +169,9 @@ sr_attach(struct device *parent, struct device *self, void *aux)
else
sc->sc_ioctl = sr_ioctl;
- if (sr_boot_assembly(sc) == 0)
- printf("\n");
+ printf("\n");
+
+ sr_boot_assembly(sc);
}
int
@@ -2099,6 +2100,11 @@ sr_boot_assembly(struct sr_softc *sc)
bp->b_dev = dev = MAKEDISKDEV(majdev, dv->dv_unit, RAW_PART);
bdsw = &bdevsw[major(dev)];
+ /* XXX is there a better way of excluding some devices? */
+ if (!strncmp(dv->dv_xname, "fd", 2) ||
+ !strncmp(dv->dv_xname, "cd", 2))
+ continue;
+
/* open device */
error = (*bdsw->d_open)(dev, FREAD, S_IFBLK, curproc);
if (error) {