diff options
author | phk <phk@FreeBSD.org> | 1997-10-16 20:32:40 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-10-16 20:32:40 +0000 |
commit | 373a865574ccc2ae06911beddc7b809dd8449423 (patch) | |
tree | c9364701073c9acbc48233602bef7453a235a02d /sys/miscfs/specfs | |
parent | 49953d2a8b5e57272bcc9a4179f881d6b847830b (diff) | |
download | FreeBSD-src-373a865574ccc2ae06911beddc7b809dd8449423.zip FreeBSD-src-373a865574ccc2ae06911beddc7b809dd8449423.tar.gz |
Another VFS cleanup "kilo commit"
1. Remove VOP_UPDATE, it is (also) an UFS/{FFS,LFS,EXT2FS,MFS}
intereface function, and now lives in the ufsmount structure.
2. Remove VOP_SEEK, it was unused.
3. Add mode default vops:
VOP_ADVLOCK vop_einval
VOP_CLOSE vop_null
VOP_FSYNC vop_null
VOP_IOCTL vop_enotty
VOP_MMAP vop_einval
VOP_OPEN vop_null
VOP_PATHCONF vop_einval
VOP_READLINK vop_einval
VOP_REALLOCBLKS vop_eopnotsupp
And remove identical functionality from filesystems
4. Add vop_stdpathconf, which returns the canonical stuff. Use
it in the filesystems. (XXX: It's probably wrong that specfs
and fifofs sets this vop, shouldn't it come from the "host"
filesystem, for instance ufs or cd9660 ?)
5. Try to make system wide VOP functions have vop_* names.
6. Initialize the um_* vectors in LFS.
(Recompile your LKMS!!!)
Diffstat (limited to 'sys/miscfs/specfs')
-rw-r--r-- | sys/miscfs/specfs/spec_vnops.c | 47 |
1 files changed, 3 insertions, 44 deletions
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index 12a9f29..bdf769b 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95 - * $Id: spec_vnops.c,v 1.46 1997/10/15 13:23:18 phk Exp $ + * $Id: spec_vnops.c,v 1.47 1997/10/16 10:48:46 phk Exp $ */ #include <sys/param.h> @@ -73,7 +73,6 @@ static int spec_poll __P((struct vop_poll_args *)); static int spec_inactive __P((struct vop_inactive_args *)); static int spec_fsync __P((struct vop_fsync_args *)); static int spec_bmap __P((struct vop_bmap_args *)); -static int spec_pathconf __P((struct vop_pathconf_args *)); static int spec_advlock __P((struct vop_advlock_args *)); static int spec_getpages __P((struct vop_getpages_args *)); @@ -98,9 +97,8 @@ static struct vnodeopv_entry_desc spec_vnodeop_entries[] = { { &vop_lookup_desc, (vop_t *) spec_lookup }, { &vop_mkdir_desc, (vop_t *) spec_badop }, { &vop_mknod_desc, (vop_t *) spec_badop }, - { &vop_mmap_desc, (vop_t *) spec_badop }, { &vop_open_desc, (vop_t *) spec_open }, - { &vop_pathconf_desc, (vop_t *) spec_pathconf }, + { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, { &vop_poll_desc, (vop_t *) spec_poll }, { &vop_print_desc, (vop_t *) spec_print }, { &vop_read_desc, (vop_t *) spec_read }, @@ -111,12 +109,10 @@ static struct vnodeopv_entry_desc spec_vnodeop_entries[] = { { &vop_remove_desc, (vop_t *) spec_badop }, { &vop_rename_desc, (vop_t *) spec_badop }, { &vop_rmdir_desc, (vop_t *) spec_badop }, - { &vop_seek_desc, (vop_t *) spec_badop }, { &vop_setattr_desc, (vop_t *) spec_ebadf }, { &vop_strategy_desc, (vop_t *) spec_strategy }, { &vop_symlink_desc, (vop_t *) spec_badop }, { &vop_unlock_desc, (vop_t *) vop_nounlock }, - { &vop_update_desc, (vop_t *) nullop }, { &vop_write_desc, (vop_t *) spec_write }, { NULL, NULL } }; @@ -473,7 +469,7 @@ spec_poll(ap) dev = ap->a_vp->v_rdev; return (*cdevsw[major(dev)]->d_poll)(dev, ap->a_events, ap->a_p); default: - return (vn_defaultop((struct vop_generic_args *)ap)); + return (vop_defaultop((struct vop_generic_args *)ap)); } } @@ -686,43 +682,6 @@ spec_print(ap) } /* - * Return POSIX pathconf information applicable to special devices. - */ -static int -spec_pathconf(ap) - struct vop_pathconf_args /* { - struct vnode *a_vp; - int a_name; - int *a_retval; - } */ *ap; -{ - - switch (ap->a_name) { - case _PC_LINK_MAX: - *ap->a_retval = LINK_MAX; - return (0); - case _PC_MAX_CANON: - *ap->a_retval = MAX_CANON; - return (0); - case _PC_MAX_INPUT: - *ap->a_retval = MAX_INPUT; - return (0); - case _PC_PIPE_BUF: - *ap->a_retval = PIPE_BUF; - return (0); - case _PC_CHOWN_RESTRICTED: - *ap->a_retval = 1; - return (0); - case _PC_VDISABLE: - *ap->a_retval = _POSIX_VDISABLE; - return (0); - default: - return (EINVAL); - } - /* NOTREACHED */ -} - -/* * Special device advisory byte-level locks. */ /* ARGSUSED */ |