From ad3917e8e6a646367dff1ca3277c2e7d7a2888eb Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 24 Feb 2004 09:59:35 +0000 Subject: [PATCH] Do not attempt to open NODEV --- sys/fs/specfs/spec_vnops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index ab9ce7f5a5b4..4fc055332056 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);