diff options
author | phk <phk@FreeBSD.org> | 1997-01-09 12:50:07 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-01-09 12:50:07 +0000 |
commit | 6ef167a5634722c687beeda7140141c49529ae9c (patch) | |
tree | 99778c412a1704d5c5891f4d739d91214b6cd237 /sys/i386 | |
parent | 2e0541fccf03edf3747e7e91b0dd6b33629d7fb1 (diff) | |
download | FreeBSD-src-6ef167a5634722c687beeda7140141c49529ae9c.zip FreeBSD-src-6ef167a5634722c687beeda7140141c49529ae9c.tar.gz |
i386/2427: 2.2-BETA ft driver panics when there're no floppy drives
Reviewed by: phk
Submitted by: hosokawa@jp.FreeBSD.org
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/isa/ft.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/i386/isa/ft.c b/sys/i386/isa/ft.c index 864faaf..a3e1643 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.27 1996/09/06 23:07:22 phk Exp $ + * $Id: ft.c,v 1.28 1996/11/27 22:51:46 phk Exp $ * * 01/19/95 ++sg * Cleaned up recalibrate/seek code at attach time for FreeBSD 2.x. @@ -2044,6 +2044,8 @@ ftopen(dev_t dev, int arg2) { /* check bounds */ if (ftu >= NFT) return(ENXIO); + if (!ft_data[ftu]) + return(ENXIO); fdc = ft_data[ftu]->fdc; if ((fdc == NULL) || (ft_data[ftu]->type == NO_TYPE)) return(ENXIO); |