summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/fs/specfs/spec_vnops.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c
index ab9ce7f..4fc0553 100644
--- a/sys/fs/specfs/spec_vnops.c
+++ b/sys/fs/specfs/spec_vnops.c
@@ -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);
OpenPOWER on IntegriCloud