mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
Fixed the error that a Fdopen succeeds without a found fd controller in
the system.
This commit is contained in:
parent
230d2c5ff9
commit
fadc21ae39
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=830
3 changed files with 9 additions and 6 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue