diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 1997-10-16 20:32:40 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1997-10-16 20:32:40 +0000 |
commit | 987f56967882129aef9aa431bee66fae50394ea5 (patch) | |
tree | bd4881b4840207110060b4087cc9cb78c43ac63a /sys/miscfs/procfs | |
parent | 2df896458d4a9759c04f59315a790f9807f4c95b (diff) | |
download | src-987f56967882129aef9aa431bee66fae50394ea5.tar.gz src-987f56967882129aef9aa431bee66fae50394ea5.zip |
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!!!)
Notes
Notes:
svn path=/head/; revision=30492
Diffstat (limited to 'sys/miscfs/procfs')
-rw-r--r-- | sys/miscfs/procfs/procfs_vnops.c | 65 |
1 files changed, 2 insertions, 63 deletions
diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index ab62a4d801d1..8caf5fe76069 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95 * - * $Id: procfs_vnops.c,v 1.35 1997/10/15 10:04:38 phk Exp $ + * $Id: procfs_vnops.c,v 1.36 1997/10/16 10:48:40 phk Exp $ */ /* @@ -64,10 +64,8 @@ static int procfs_bmap __P((struct vop_bmap_args *)); static int procfs_close __P((struct vop_close_args *)); static int procfs_getattr __P((struct vop_getattr_args *)); static int procfs_inactive __P((struct vop_inactive_args *)); -static int procfs_ioctl __P((struct vop_ioctl_args *)); static int procfs_lookup __P((struct vop_lookup_args *)); static int procfs_open __P((struct vop_open_args *)); -static int procfs_pathconf __P((struct vop_pathconf_args *ap)); static int procfs_print __P((struct vop_print_args *)); static int procfs_readdir __P((struct vop_readdir_args *)); static int procfs_readlink __P((struct vop_readlink_args *)); @@ -185,24 +183,6 @@ procfs_close(ap) } /* - * do an ioctl operation on pfsnode (vp). - * (vp) is not locked on entry or exit. - */ -static int -procfs_ioctl(ap) - struct vop_ioctl_args /* { - struct vnode *a_vp; - int a_command; - caddr_t a_data; - int a_fflag; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - return (ENOTTY); -} - -/* * do block mapping for pfsnode (vp). * since we don't use the buffer cache * for procfs this function should never @@ -282,43 +262,6 @@ procfs_reclaim(ap) } /* - * Return POSIX pathconf information applicable to special devices. - */ -static int -procfs_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 */ -} - -/* * _print is used for debugging. * just print a readable description * of (vp). @@ -950,16 +893,14 @@ static struct vnodeopv_entry_desc procfs_vnodeop_entries[] = { { &vop_create_desc, (vop_t *) procfs_badop }, { &vop_getattr_desc, (vop_t *) procfs_getattr }, { &vop_inactive_desc, (vop_t *) procfs_inactive }, - { &vop_ioctl_desc, (vop_t *) procfs_ioctl }, { &vop_islocked_desc, (vop_t *) vop_noislocked }, { &vop_link_desc, (vop_t *) procfs_badop }, { &vop_lock_desc, (vop_t *) vop_nolock }, { &vop_lookup_desc, (vop_t *) procfs_lookup }, { &vop_mkdir_desc, (vop_t *) procfs_badop }, { &vop_mknod_desc, (vop_t *) procfs_badop }, - { &vop_mmap_desc, (vop_t *) procfs_badop }, { &vop_open_desc, (vop_t *) procfs_open }, - { &vop_pathconf_desc, (vop_t *) procfs_pathconf }, + { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, { &vop_print_desc, (vop_t *) procfs_print }, { &vop_read_desc, (vop_t *) procfs_rw }, { &vop_readdir_desc, (vop_t *) procfs_readdir }, @@ -968,11 +909,9 @@ static struct vnodeopv_entry_desc procfs_vnodeop_entries[] = { { &vop_remove_desc, (vop_t *) procfs_badop }, { &vop_rename_desc, (vop_t *) procfs_badop }, { &vop_rmdir_desc, (vop_t *) procfs_badop }, - { &vop_seek_desc, (vop_t *) procfs_badop }, { &vop_setattr_desc, (vop_t *) procfs_setattr }, { &vop_symlink_desc, (vop_t *) procfs_badop }, { &vop_unlock_desc, (vop_t *) vop_nounlock }, - { &vop_update_desc, (vop_t *) nullop }, { &vop_write_desc, (vop_t *) procfs_rw }, { NULL, NULL } }; |