summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_vnops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r--sys/kern/vfs_vnops.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 71a43f5..a91ca18 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94
- * $Id: vfs_vnops.c,v 1.74 1999/08/13 11:22:48 phk Exp $
+ * $Id: vfs_vnops.c,v 1.75 1999/08/25 11:44:11 phk Exp $
*/
#include <sys/param.h>
@@ -496,6 +496,12 @@ vn_ioctl(fp, com, data, p)
case VFIFO:
case VCHR:
case VBLK:
+ if (com == FIODTYPE) {
+ if (vp->v_type != VCHR && vp->v_type != VBLK)
+ return (ENOTTY);
+ *(int *)data = devsw(vp->v_rdev)->d_flags & D_TYPEMASK;
+ return (0);
+ }
error = VOP_IOCTL(vp, com, data, fp->f_flag, p->p_ucred, p);
if (error == 0 && com == TIOCSCTTY) {
OpenPOWER on IntegriCloud