On i386, don't try to do network-type stuff if the device name is'nt pxeN.

This commit is contained in:
Doug Rabson 2008-04-05 15:03:29 +00:00
parent 9d4ae9aa5b
commit 472f4537e6
1 changed files with 7 additions and 0 deletions

View File

@ -412,9 +412,16 @@ nfs_open(upath, f)
return (ENXIO); return (ENXIO);
} }
/*
* This is silly - we should look at dv_type but that value is
* arch dependant and we can't use it here.
*/
#ifndef __i386__ #ifndef __i386__
if (strcmp(f->f_dev->dv_name, "net") != 0) if (strcmp(f->f_dev->dv_name, "net") != 0)
return(EINVAL); return(EINVAL);
#else
if (strcmp(f->f_dev->dv_name, "pxe") != 0)
return(EINVAL);
#endif #endif
if (!(desc = socktodesc(*(int *)(f->f_devdata)))) if (!(desc = socktodesc(*(int *)(f->f_devdata))))