summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2004-09-21 08:33:05 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2004-09-21 08:33:05 +0000
commit90a660e1998ee05094bf75302aa1793533c0629a (patch)
tree6429a49af77284d02bab0bd38d6af7d692023f32
parent205eb0cd5eeef29830e32b7eb39042f8910f6e55 (diff)
Notes
-rw-r--r--sys/kern/vfs_vnops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index d8204b6e9856..7cc09ccb04fc 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -806,6 +806,8 @@ vn_ioctl(fp, com, data, active_cred, td)
case VCHR:
case VBLK:
if (com == FIODTYPE) {
+ if (vp->v_rdev == NULL)
+ return (EOPNOTSUPP);
if (vp->v_type != VCHR && vp->v_type != VBLK)
return (ENOTTY);
*(int *)data = devsw(vp->v_rdev)->d_flags & D_TYPEMASK;