diff options
| author | Simon L. B. Nielsen <simon@FreeBSD.org> | 2005-07-20 13:34:16 +0000 |
|---|---|---|
| committer | Simon L. B. Nielsen <simon@FreeBSD.org> | 2005-07-20 13:34:16 +0000 |
| commit | 02a4be3f74a570c6c427082bca7e131a00e4c512 (patch) | |
| tree | 48bcf54729c2d392c579772253c678b9faefc6a9 | |
| parent | 0e0fe87a70b282abb3de395ad788468bdc05ce75 (diff) | |
Notes
| -rw-r--r-- | sys/fs/devfs/devfs_vnops.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index b03498f20c138..34e78d98825df 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -788,6 +788,12 @@ devfs_mknod(struct vop_mknod_args *ap) struct devfs_mount *dmp; int error; + /* + * The only type of node we should be creating here is a + * character device, for anything else return EOPNOTSUPP. + */ + if (ap->a_vap->va_type != VCHR) + return (EOPNOTSUPP); dvp = ap->a_dvp; dmp = VFSTODEVFS(dvp->v_mount); lockmgr(&dmp->dm_lock, LK_EXCLUSIVE, 0, curthread); |
