Do not attempt to open NODEV

This commit is contained in:
Poul-Henning Kamp 2004-02-24 09:59:35 +00:00
parent f99a4b252c
commit ad3917e8e6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=126191

View File

@ -148,6 +148,9 @@ spec_open(ap)
if (vp->v_mount && (vp->v_mount->mnt_flag & MNT_NODEV))
return (ENXIO);
if (dev == NODEV)
return (ENXIO);
dsw = devsw(dev);
if (dsw == NULL || dsw->d_open == NULL)
return (ENXIO);