diff options
author | ats <ats@FreeBSD.org> | 1993-12-04 16:13:18 +0000 |
---|---|---|
committer | ats <ats@FreeBSD.org> | 1993-12-04 16:13:18 +0000 |
commit | 1108a57b4ce2e0e6dd12c837d164f208c17bfbf8 (patch) | |
tree | b1a2c55ffdfa668378b25b0b8b977171575f4e31 /sys/dev/fdc | |
parent | e781a415b534073f1e48f5ff0d317f2f99b78139 (diff) | |
download | FreeBSD-src-1108a57b4ce2e0e6dd12c837d164f208c17bfbf8.zip FreeBSD-src-1108a57b4ce2e0e6dd12c837d164f208c17bfbf8.tar.gz |
Fixed the error that a Fdopen succeeds without a found fd controller in
the system.
Diffstat (limited to 'sys/dev/fdc')
-rw-r--r-- | sys/dev/fdc/fdc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 462643f..814ae09 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.7 1993/11/25 01:31:32 wollman Exp $ + * $Id: fd.c,v 1.8 1993/12/03 05:01:40 alm Exp $ * */ @@ -513,7 +513,8 @@ Fdopen(dev, flags) int s; /* check bounds */ - if (fdu >= NFD || fd_data[fdu].type == NO_TYPE) return(ENXIO); + if (fdu >= NFD || fd_data[fdu].fdc == NULL + || fd_data[fdu].type == NO_TYPE) return(ENXIO); /*if (type >= NUMTYPES) return(ENXIO);*/ fd_data[fdu].flags |= FD_OPEN; |