diff options
author | 2007-05-27 00:10:47 +0000 | |
---|---|---|
committer | 2007-05-27 00:10:47 +0000 | |
commit | d43067a31b84996c21696b60734151211eb19fdb (patch) | |
tree | 62dbf795f2cb53af3da1f5482acebc37f45eb0f8 /sys/dev/softraid.c | |
parent | Fix off-by-one, from Tobias Stoeckmann. (diff) | |
download | wireguard-openbsd-d43067a31b84996c21696b60734151211eb19fdb.tar.xz wireguard-openbsd-d43067a31b84996c21696b60734151211eb19fdb.zip |
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/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 12 |
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) { |