summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1994-12-04 03:10:09 +0000
committerjkh <jkh@FreeBSD.org>1994-12-04 03:10:09 +0000
commit8514c97735447fcb2a9d12493cf3f8a0574a0d5b (patch)
tree491b7dee3b77c213934d44b8d5c76483981a4c9f /sys
parent4665766ad121fdaf3c1e9598fa25edd3b8ea615d (diff)
downloadFreeBSD-src-8514c97735447fcb2a9d12493cf3f8a0574a0d5b.zip
FreeBSD-src-8514c97735447fcb2a9d12493cf3f8a0574a0d5b.tar.gz
>Originator: Gene Stark
>Description: If a process attempts to open a floppy tape device when the device has been configured in the kernel, but did not probe and attach on bootup, then a panic will occur. [Review: The current ft situation is a crock, and this only bandaids an earlier wound inflicted by making the attach conditional. This urgently requires a review] Submitted by: gene
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/isa/ft.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/i386/isa/ft.c b/sys/i386/isa/ft.c
index 2ab4a77..a1594ad 100644
--- a/sys/i386/isa/ft.c
+++ b/sys/i386/isa/ft.c
@@ -17,7 +17,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* ft.c - QIC-40/80 floppy tape driver
- * $Id: ft.c,v 1.13 1994/10/23 21:27:14 wollman Exp $
+ * $Id: ft.c,v 1.14 1994/11/15 14:34:42 bde Exp $
*
* 06/07/94 v0.9 ++sg
* Tape stuck on segment problem should be gone. Re-wrote buffering
@@ -2057,6 +2057,8 @@ ftopen(dev_t dev, int arg2) {
if (ftu >= NFT)
return(ENXIO);
fdc = ft_data[ftu].fdc;
+ if ((fdc == NULL) || (ft_data[ftu].type == NO_TYPE))
+ return(ENXIO);
/* check for controller already busy with tape */
if (fdc->flags & FDC_TAPE_BUSY)
return(EBUSY);
OpenPOWER on IntegriCloud