diff options
author | phk <phk@FreeBSD.org> | 2004-09-21 08:42:37 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-09-21 08:42:37 +0000 |
commit | d905f27bbb4ee6ba77724e2f6ea5f9381519c059 (patch) | |
tree | 1ba013baf38dca7d255aa1e2309447650b6726a9 /sys/fs | |
parent | 3441ee7248bc33944ff2662f2cce227030ba796a (diff) | |
download | FreeBSD-src-d905f27bbb4ee6ba77724e2f6ea5f9381519c059.zip FreeBSD-src-d905f27bbb4ee6ba77724e2f6ea5f9381519c059.tar.gz |
De support opening device nodes on CD9660 filesystems. They are
still visible, they can still be seen, but they cannot be opened.
Use DEVFS for that.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/cd9660/cd9660_vfsops.c | 8 | ||||
-rw-r--r-- | sys/fs/cd9660/cd9660_vnops.c | 22 |
2 files changed, 9 insertions, 21 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 639dc75..f904888 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -864,14 +864,6 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir) case VFIFO: vp->v_op = cd9660_fifoop_p; break; - case VBLK: - vp->v_op = cd9660_specop_p; - break; - case VCHR: - vp->v_op = cd9660_specop_p; - vp = addaliasu(vp, ip->inode.iso_rdev); - ip->i_vnode = vp; - break; default: break; } diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index 40eb1dd..f166f05 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -131,6 +131,9 @@ cd9660_access(ap) struct iso_node *ip = VTOI(vp); mode_t mode = ap->a_mode; + if (vp->v_type == VREG || vp->v_type == VBLK) + return (EOPNOTSUPP); + /* * Disallow write attempts unless the file is a socket, * fifo, or a block or character device resident on the @@ -228,6 +231,9 @@ cd9660_ioctl(ap) struct vnode *vp = ap->a_vp; struct iso_node *ip = VTOI(vp); + if (vp->v_type == VREG || vp->v_type == VBLK) + return (EOPNOTSUPP); + switch (ap->a_command) { case FIOGETLBA: @@ -261,6 +267,9 @@ cd9660_read(ap) int seqcount; long size, n, on; + if (vp->v_type == VREG || vp->v_type == VBLK) + return (EOPNOTSUPP); + seqcount = ap->a_ioflag >> IO_SEQSHIFT; if (uio->uio_resid == 0) @@ -799,19 +808,6 @@ VNODEOP_SET(cd9660_vnodeop_opv_desc); /* * Special device vnode ops */ -vop_t **cd9660_specop_p; -static struct vnodeopv_entry_desc cd9660_specop_entries[] = { - { &vop_default_desc, (vop_t *) spec_vnoperate }, - { &vop_access_desc, (vop_t *) cd9660_access }, - { &vop_getattr_desc, (vop_t *) cd9660_getattr }, - { &vop_inactive_desc, (vop_t *) cd9660_inactive }, - { &vop_reclaim_desc, (vop_t *) cd9660_reclaim }, - { &vop_setattr_desc, (vop_t *) cd9660_setattr }, - { NULL, NULL } -}; -static struct vnodeopv_desc cd9660_specop_opv_desc = - { &cd9660_specop_p, cd9660_specop_entries }; -VNODEOP_SET(cd9660_specop_opv_desc); vop_t **cd9660_fifoop_p; static struct vnodeopv_entry_desc cd9660_fifoop_entries[] = { |