summaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2008-05-09 00:25:42 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2008-05-09 00:25:42 +0000
commita25b4a6e1a5963b74c272df3334ddbafeb727183 (patch)
tree7a1eec292c6d0b7df18ccdeebaf056cc5c15bf8c /sys/scsi
parent6517474be5a51e750bec688e00899ab938b09196 (diff)
Oops. When detaching tape drives look for devices using 'stopen' not
devices using 'sdopen'. PR#5810 from Jozef Hatala. ok beck@
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/st.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index 8b42866d6ac..24832f045a8 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: st.c,v 1.80 2007/11/27 16:22:14 martynas Exp $ */
+/* $OpenBSD: st.c,v 1.81 2008/05/09 00:25:41 krw Exp $ */
/* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */
/*
@@ -383,14 +383,14 @@ stdetach(struct device *self, int flags)
mn = STUNIT(self->dv_unit);
for (bmaj = 0; bmaj < nblkdev; bmaj++)
- if (bdevsw[bmaj].d_open == sdopen) {
+ if (bdevsw[bmaj].d_open == stopen) {
vdevgone(bmaj, mn, mn + 0, VBLK);
vdevgone(bmaj, mn, mn + 1, VBLK);
vdevgone(bmaj, mn, mn + 2, VBLK);
vdevgone(bmaj, mn, mn + 3, VBLK);
}
for (cmaj = 0; cmaj < nchrdev; cmaj++)
- if (cdevsw[cmaj].d_open == sdopen) {
+ if (cdevsw[cmaj].d_open == stopen) {
vdevgone(cmaj, mn, mn + 0, VCHR);
vdevgone(cmaj, mn, mn + 1, VCHR);
vdevgone(cmaj, mn, mn + 2, VCHR);