diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index b794436451fb..031832487ed5 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vnops.c 8.19 (Berkeley) 5/27/95 - * $Id: cd9660_vnops.c,v 1.43 1997/10/15 13:22:39 phk Exp $ + * $Id: cd9660_vnops.c,v 1.44 1997/10/16 10:47:47 phk Exp $ */ #include @@ -59,14 +59,9 @@ #include static int cd9660_setattr __P((struct vop_setattr_args *)); -static int cd9660_open __P((struct vop_open_args *)); -static int cd9660_close __P((struct vop_close_args *)); static int cd9660_access __P((struct vop_access_args *)); static int cd9660_getattr __P((struct vop_getattr_args *)); static int cd9660_read __P((struct vop_read_args *)); -static int cd9660_ioctl __P((struct vop_ioctl_args *)); -static int cd9660_mmap __P((struct vop_mmap_args *)); -static int cd9660_seek __P((struct vop_seek_args *)); struct isoreaddir; static int iso_uiodir __P((struct isoreaddir *idp, struct dirent *dp, off_t off)); @@ -117,42 +112,6 @@ cd9660_setattr(ap) return (0); } -/* - * Open called. - * - * Nothing to do. - */ -/* ARGSUSED */ -static int -cd9660_open(ap) - struct vop_open_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - return (0); -} - -/* - * Close called - * - * Update the times on the inode on writeable file systems. - */ -/* ARGSUSED */ -static int -cd9660_close(ap) - struct vop_close_args /* { - struct vnode *a_vp; - int a_fflag; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - return (0); -} - /* * Check mode permission on inode pointer. Mode is READ, WRITE or EXEC. * The mode is shifted to select the owner/group/other fields. The @@ -357,60 +316,6 @@ cd9660_read(ap) return (error); } -/* ARGSUSED */ -static int -cd9660_ioctl(ap) - struct vop_ioctl_args /* { - struct vnode *a_vp; - u_long a_command; - caddr_t a_data; - int a_fflag; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - printf("You did ioctl for isofs !!\n"); - return (ENOTTY); -} - -/* - * Mmap a file - * - * NB Currently unsupported. - */ -/* ARGSUSED */ -static int -cd9660_mmap(ap) - struct vop_mmap_args /* { - struct vnode *a_vp; - int a_fflags; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - - return (EINVAL); -} - -/* - * Seek on a file - * - * Nothing to do, so just return. - */ -/* ARGSUSED */ -static int -cd9660_seek(ap) - struct vop_seek_args /* { - struct vnode *a_vp; - off_t a_oldoff; - off_t a_newoff; - struct ucred *a_cred; - } */ *ap; -{ - - return (0); -} - /* * Structure for reading directories */ @@ -962,23 +867,17 @@ struct vnodeopv_entry_desc cd9660_vnodeop_entries[] = { { &vop_access_desc, (vop_t *) cd9660_access }, { &vop_bmap_desc, (vop_t *) cd9660_bmap }, { &vop_cachedlookup_desc, (vop_t *) cd9660_lookup }, - { &vop_close_desc, (vop_t *) cd9660_close }, - { &vop_fsync_desc, (vop_t *) nullop }, { &vop_getattr_desc, (vop_t *) cd9660_getattr }, { &vop_inactive_desc, (vop_t *) cd9660_inactive }, - { &vop_ioctl_desc, (vop_t *) cd9660_ioctl }, { &vop_islocked_desc, (vop_t *) cd9660_islocked }, { &vop_lock_desc, (vop_t *) cd9660_lock }, { &vop_lookup_desc, (vop_t *) vfs_cache_lookup }, - { &vop_mmap_desc, (vop_t *) cd9660_mmap }, - { &vop_open_desc, (vop_t *) cd9660_open }, { &vop_pathconf_desc, (vop_t *) cd9660_pathconf }, { &vop_print_desc, (vop_t *) cd9660_print }, { &vop_read_desc, (vop_t *) cd9660_read }, { &vop_readdir_desc, (vop_t *) cd9660_readdir }, { &vop_readlink_desc, (vop_t *) cd9660_readlink }, { &vop_reclaim_desc, (vop_t *) cd9660_reclaim }, - { &vop_seek_desc, (vop_t *) cd9660_seek }, { &vop_setattr_desc, (vop_t *) cd9660_setattr }, { &vop_strategy_desc, (vop_t *) cd9660_strategy }, { &vop_unlock_desc, (vop_t *) cd9660_unlock }, diff --git a/sys/fs/deadfs/dead_vnops.c b/sys/fs/deadfs/dead_vnops.c index 3c411307ae0c..051977f3da87 100644 --- a/sys/fs/deadfs/dead_vnops.c +++ b/sys/fs/deadfs/dead_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93 - * $Id: dead_vnops.c,v 1.17 1997/10/15 10:04:03 phk Exp $ + * $Id: dead_vnops.c,v 1.18 1997/10/16 10:48:06 phk Exp $ */ #include @@ -61,9 +61,7 @@ static struct vnodeopv_entry_desc dead_vnodeop_entries[] = { { &vop_access_desc, (vop_t *) dead_ebadf }, { &vop_advlock_desc, (vop_t *) dead_ebadf }, { &vop_bmap_desc, (vop_t *) dead_bmap }, - { &vop_close_desc, (vop_t *) nullop }, { &vop_create_desc, (vop_t *) dead_badop }, - { &vop_fsync_desc, (vop_t *) nullop }, { &vop_getattr_desc, (vop_t *) dead_ebadf }, { &vop_inactive_desc, (vop_t *) nullop }, { &vop_ioctl_desc, (vop_t *) dead_ioctl }, @@ -75,7 +73,7 @@ static struct vnodeopv_entry_desc dead_vnodeop_entries[] = { { &vop_mknod_desc, (vop_t *) dead_badop }, { &vop_mmap_desc, (vop_t *) dead_badop }, { &vop_open_desc, (vop_t *) dead_open }, - { &vop_pathconf_desc, (vop_t *) dead_ebadf }, + { &vop_pathconf_desc, (vop_t *) dead_ebadf }, /* per pathconf(2) */ { &vop_print_desc, (vop_t *) dead_print }, { &vop_read_desc, (vop_t *) dead_read }, { &vop_readdir_desc, (vop_t *) dead_ebadf }, @@ -84,11 +82,9 @@ static struct vnodeopv_entry_desc dead_vnodeop_entries[] = { { &vop_remove_desc, (vop_t *) dead_badop }, { &vop_rename_desc, (vop_t *) dead_badop }, { &vop_rmdir_desc, (vop_t *) dead_badop }, - { &vop_seek_desc, (vop_t *) nullop }, { &vop_setattr_desc, (vop_t *) dead_ebadf }, { &vop_symlink_desc, (vop_t *) dead_badop }, { &vop_unlock_desc, (vop_t *) vop_nounlock }, - { &vop_update_desc, (vop_t *) nullop }, { &vop_write_desc, (vop_t *) dead_write }, { NULL, NULL } }; diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 7793177e5db2..ccc5e5b60797 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -35,7 +35,7 @@ * * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94 * - * $Id: fdesc_vnops.c,v 1.28 1997/10/15 10:04:12 phk Exp $ + * $Id: fdesc_vnops.c,v 1.29 1997/10/16 10:48:18 phk Exp $ */ /* @@ -91,7 +91,6 @@ static int fdesc_inactive __P((struct vop_inactive_args *ap)); static int fdesc_ioctl __P((struct vop_ioctl_args *ap)); static int fdesc_lookup __P((struct vop_lookup_args *ap)); static int fdesc_open __P((struct vop_open_args *ap)); -static int fdesc_pathconf __P((struct vop_pathconf_args *ap)); static int fdesc_print __P((struct vop_print_args *ap)); static int fdesc_read __P((struct vop_read_args *ap)); static int fdesc_readdir __P((struct vop_readdir_args *ap)); @@ -830,43 +829,6 @@ fdesc_reclaim(ap) return (0); } -/* - * Return POSIX pathconf information applicable to special devices. - */ -static int -fdesc_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 out the contents of a /dev/fd vnode. */ @@ -897,8 +859,6 @@ static struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = { { &vop_default_desc, (vop_t *) vn_default_error }, { &vop_access_desc, (vop_t *) nullop }, { &vop_bmap_desc, (vop_t *) fdesc_badop }, - { &vop_close_desc, (vop_t *) nullop }, - { &vop_fsync_desc, (vop_t *) nullop }, { &vop_getattr_desc, (vop_t *) fdesc_getattr }, { &vop_inactive_desc, (vop_t *) fdesc_inactive }, { &vop_ioctl_desc, (vop_t *) fdesc_ioctl }, @@ -906,14 +866,13 @@ static struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = { { &vop_lock_desc, (vop_t *) vop_nolock }, { &vop_lookup_desc, (vop_t *) fdesc_lookup }, { &vop_open_desc, (vop_t *) fdesc_open }, - { &vop_pathconf_desc, (vop_t *) fdesc_pathconf }, + { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, { &vop_poll_desc, (vop_t *) fdesc_poll }, { &vop_print_desc, (vop_t *) fdesc_print }, { &vop_read_desc, (vop_t *) fdesc_read }, { &vop_readdir_desc, (vop_t *) fdesc_readdir }, { &vop_readlink_desc, (vop_t *) fdesc_readlink }, { &vop_reclaim_desc, (vop_t *) fdesc_reclaim }, - { &vop_seek_desc, (vop_t *) nullop }, { &vop_setattr_desc, (vop_t *) fdesc_setattr }, { &vop_unlock_desc, (vop_t *) vop_nounlock }, { &vop_write_desc, (vop_t *) fdesc_write }, diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c index 0b157a545223..8c46042585c3 100644 --- a/sys/fs/fifofs/fifo_vnops.c +++ b/sys/fs/fifofs/fifo_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)fifo_vnops.c 8.10 (Berkeley) 5/27/95 - * $Id: fifo_vnops.c,v 1.31 1997/10/15 13:23:12 phk Exp $ + * $Id: fifo_vnops.c,v 1.32 1997/10/16 10:48:25 phk Exp $ */ #include @@ -72,7 +72,6 @@ static int fifo_ioctl __P((struct vop_ioctl_args *)); static int fifo_poll __P((struct vop_poll_args *)); static int fifo_inactive __P((struct vop_inactive_args *)); static int fifo_bmap __P((struct vop_bmap_args *)); -static int fifo_pathconf __P((struct vop_pathconf_args *)); static int fifo_advlock __P((struct vop_advlock_args *)); @@ -85,7 +84,6 @@ static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = { { &vop_bmap_desc, (vop_t *) fifo_bmap }, { &vop_close_desc, (vop_t *) fifo_close }, { &vop_create_desc, (vop_t *) fifo_badop }, - { &vop_fsync_desc, (vop_t *) nullop }, { &vop_getattr_desc, (vop_t *) fifo_ebadf }, { &vop_inactive_desc, (vop_t *) fifo_inactive }, { &vop_ioctl_desc, (vop_t *) fifo_ioctl }, @@ -96,9 +94,8 @@ static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = { { &vop_lookup_desc, (vop_t *) fifo_lookup }, { &vop_mkdir_desc, (vop_t *) fifo_badop }, { &vop_mknod_desc, (vop_t *) fifo_badop }, - { &vop_mmap_desc, (vop_t *) fifo_badop }, { &vop_open_desc, (vop_t *) fifo_open }, - { &vop_pathconf_desc, (vop_t *) fifo_pathconf }, + { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, { &vop_poll_desc, (vop_t *) fifo_poll }, { &vop_print_desc, (vop_t *) fifo_print }, { &vop_read_desc, (vop_t *) fifo_read }, @@ -109,11 +106,9 @@ static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = { { &vop_remove_desc, (vop_t *) fifo_badop }, { &vop_rename_desc, (vop_t *) fifo_badop }, { &vop_rmdir_desc, (vop_t *) fifo_badop }, - { &vop_seek_desc, (vop_t *) fifo_badop }, { &vop_setattr_desc, (vop_t *) fifo_ebadf }, { &vop_symlink_desc, (vop_t *) fifo_badop }, { &vop_unlock_desc, (vop_t *) vop_nounlock }, - { &vop_update_desc, (vop_t *) nullop }, { &vop_write_desc, (vop_t *) fifo_write }, { NULL, NULL } }; @@ -492,34 +487,6 @@ fifo_print(ap) return (0); } -/* - * Return POSIX pathconf information applicable to fifo's. - */ -static int -fifo_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_PIPE_BUF: - *ap->a_retval = PIPE_BUF; - return (0); - case _PC_CHOWN_RESTRICTED: - *ap->a_retval = 1; - return (0); - default: - return (EINVAL); - } - /* NOTREACHED */ -} - /* * Fifo failed operation */ diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 6871b107fba2..5adce6f7603a 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vnops.c,v 1.47 1997/10/15 10:05:03 phk Exp $ */ +/* $Id: msdosfs_vnops.c,v 1.48 1997/10/16 10:48:52 phk Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */ /*- @@ -79,18 +79,13 @@ */ static int msdosfs_create __P((struct vop_create_args *)); static int msdosfs_mknod __P((struct vop_mknod_args *)); -static int msdosfs_open __P((struct vop_open_args *)); static int msdosfs_close __P((struct vop_close_args *)); static int msdosfs_access __P((struct vop_access_args *)); static int msdosfs_getattr __P((struct vop_getattr_args *)); static int msdosfs_setattr __P((struct vop_setattr_args *)); static int msdosfs_read __P((struct vop_read_args *)); static int msdosfs_write __P((struct vop_write_args *)); -static int msdosfs_ioctl __P((struct vop_ioctl_args *)); -static int msdosfs_poll __P((struct vop_poll_args *)); -static int msdosfs_mmap __P((struct vop_mmap_args *)); static int msdosfs_fsync __P((struct vop_fsync_args *)); -static int msdosfs_seek __P((struct vop_seek_args *)); static int msdosfs_remove __P((struct vop_remove_args *)); static int msdosfs_link __P((struct vop_link_args *)); static int msdosfs_rename __P((struct vop_rename_args *)); @@ -98,7 +93,6 @@ static int msdosfs_mkdir __P((struct vop_mkdir_args *)); static int msdosfs_rmdir __P((struct vop_rmdir_args *)); static int msdosfs_symlink __P((struct vop_symlink_args *)); static int msdosfs_readdir __P((struct vop_readdir_args *)); -static int msdosfs_readlink __P((struct vop_readlink_args *)); static int msdosfs_abortop __P((struct vop_abortop_args *)); static int msdosfs_lock __P((struct vop_lock_args *)); static int msdosfs_unlock __P((struct vop_unlock_args *)); @@ -106,9 +100,7 @@ static int msdosfs_bmap __P((struct vop_bmap_args *)); static int msdosfs_strategy __P((struct vop_strategy_args *)); static int msdosfs_print __P((struct vop_print_args *)); static int msdosfs_islocked __P((struct vop_islocked_args *)); -static int msdosfs_advlock __P((struct vop_advlock_args *)); static int msdosfs_pathconf __P((struct vop_pathconf_args *ap)); -static int msdosfs_reallocblks __P((struct vop_reallocblks_args *)); /* * Some general notes: @@ -214,18 +206,6 @@ msdosfs_mknod(ap) return error; } -static int -msdosfs_open(ap) - struct vop_open_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - return 0; -} - static int msdosfs_close(ap) struct vop_close_args /* { @@ -826,45 +806,6 @@ msdosfs_write(ap) return error; } -static int -msdosfs_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; -} - -static int -msdosfs_poll(ap) - struct vop_poll_args /* { - struct vnode *a_vp; - int a_events; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - /* DOS filesystems never block? */ - return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)); -} - -static int -msdosfs_mmap(ap) - struct vop_mmap_args /* { - struct vnode *a_vp; - int a_fflags; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - return EINVAL; -} - /* * Flush the blocks of a file to disk. * @@ -919,22 +860,6 @@ msdosfs_fsync(ap) return deupdat(VTODE(vp), &ts, wait); } -/* - * Now the whole work of extending a file is done in the write function. - * So nothing to do here. - */ -static int -msdosfs_seek(ap) - struct vop_seek_args /* { - struct vnode *a_vp; - off_t a_oldoff; - off_t a_newoff; - struct ucred *a_cred; - } */ *ap; -{ - return 0; -} - static int msdosfs_remove(ap) struct vop_remove_args /* { @@ -1772,20 +1697,6 @@ out: ; return error; } -/* - * DOS filesystems don't know what symlinks are. - */ -static int -msdosfs_readlink(ap) - struct vop_readlink_args /* { - struct vnode *a_vp; - struct uio *a_uio; - struct ucred *a_cred; - } */ *ap; -{ - return EINVAL; -} - static int msdosfs_abortop(ap) struct vop_abortop_args /* { @@ -1872,17 +1783,6 @@ msdosfs_bmap(ap) return pcbmap(dep, ap->a_bn, ap->a_bnp, 0); } -static int -msdosfs_reallocblks(ap) - struct vop_reallocblks_args /* { - struct vnode *a_vp; - struct cluster_save *a_buflist; - } */ *ap; -{ - /* Currently no support for clustering */ /* XXX */ - return ENOSPC; -} - static int msdosfs_strategy(ap) struct vop_strategy_args /* { @@ -1942,19 +1842,6 @@ msdosfs_print(ap) return 0; } -static int -msdosfs_advlock(ap) - struct vop_advlock_args /* { - struct vnode *a_vp; - caddr_t a_id; - int a_op; - struct flock *a_fl; - int a_flags; - } */ *ap; -{ - return EINVAL; /* we don't do locking yet */ -} - static int msdosfs_pathconf(ap) struct vop_pathconf_args /* { @@ -1990,7 +1877,6 @@ static struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = { { &vop_default_desc, (vop_t *) vn_default_error }, { &vop_abortop_desc, (vop_t *) msdosfs_abortop }, { &vop_access_desc, (vop_t *) msdosfs_access }, - { &vop_advlock_desc, (vop_t *) msdosfs_advlock }, { &vop_bmap_desc, (vop_t *) msdosfs_bmap }, { &vop_cachedlookup_desc, (vop_t *) msdosfs_lookup }, { &vop_close_desc, (vop_t *) msdosfs_close }, @@ -1998,27 +1884,20 @@ static struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = { { &vop_fsync_desc, (vop_t *) msdosfs_fsync }, { &vop_getattr_desc, (vop_t *) msdosfs_getattr }, { &vop_inactive_desc, (vop_t *) msdosfs_inactive }, - { &vop_ioctl_desc, (vop_t *) msdosfs_ioctl }, { &vop_islocked_desc, (vop_t *) msdosfs_islocked }, { &vop_link_desc, (vop_t *) msdosfs_link }, { &vop_lock_desc, (vop_t *) msdosfs_lock }, { &vop_lookup_desc, (vop_t *) vfs_cache_lookup }, { &vop_mkdir_desc, (vop_t *) msdosfs_mkdir }, { &vop_mknod_desc, (vop_t *) msdosfs_mknod }, - { &vop_mmap_desc, (vop_t *) msdosfs_mmap }, - { &vop_open_desc, (vop_t *) msdosfs_open }, { &vop_pathconf_desc, (vop_t *) msdosfs_pathconf }, - { &vop_poll_desc, (vop_t *) msdosfs_poll }, { &vop_print_desc, (vop_t *) msdosfs_print }, { &vop_read_desc, (vop_t *) msdosfs_read }, { &vop_readdir_desc, (vop_t *) msdosfs_readdir }, - { &vop_readlink_desc, (vop_t *) msdosfs_readlink }, - { &vop_reallocblks_desc, (vop_t *) msdosfs_reallocblks }, { &vop_reclaim_desc, (vop_t *) msdosfs_reclaim }, { &vop_remove_desc, (vop_t *) msdosfs_remove }, { &vop_rename_desc, (vop_t *) msdosfs_rename }, { &vop_rmdir_desc, (vop_t *) msdosfs_rmdir }, - { &vop_seek_desc, (vop_t *) msdosfs_seek }, { &vop_setattr_desc, (vop_t *) msdosfs_setattr }, { &vop_strategy_desc, (vop_t *) msdosfs_strategy }, { &vop_symlink_desc, (vop_t *) msdosfs_symlink }, diff --git a/sys/fs/portalfs/portal_vnops.c b/sys/fs/portalfs/portal_vnops.c index d8c2230deba7..df35f0c7fafa 100644 --- a/sys/fs/portalfs/portal_vnops.c +++ b/sys/fs/portalfs/portal_vnops.c @@ -35,7 +35,7 @@ * * @(#)portal_vnops.c 8.14 (Berkeley) 5/21/95 * - * $Id: portal_vnops.c,v 1.23 1997/10/15 10:04:34 phk Exp $ + * $Id: portal_vnops.c,v 1.24 1997/10/16 10:48:35 phk Exp $ */ /* @@ -73,7 +73,6 @@ static int portal_getattr __P((struct vop_getattr_args *ap)); static int portal_inactive __P((struct vop_inactive_args *ap)); static int portal_lookup __P((struct vop_lookup_args *ap)); static int portal_open __P((struct vop_open_args *ap)); -static int portal_pathconf __P((struct vop_pathconf_args *ap)); static int portal_print __P((struct vop_print_args *ap)); static int portal_readdir __P((struct vop_readdir_args *ap)); static int portal_reclaim __P((struct vop_reclaim_args *ap)); @@ -559,42 +558,6 @@ portal_reclaim(ap) return (0); } -/* - * Return POSIX pathconf information applicable to special devices. - */ -static int -portal_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 out the contents of a Portal vnode. @@ -638,19 +601,16 @@ static struct vnodeopv_entry_desc portal_vnodeop_entries[] = { { &vop_default_desc, (vop_t *) vn_default_error }, { &vop_access_desc, (vop_t *) nullop }, { &vop_bmap_desc, (vop_t *) portal_badop }, - { &vop_close_desc, (vop_t *) nullop }, - { &vop_fsync_desc, (vop_t *) nullop }, { &vop_getattr_desc, (vop_t *) portal_getattr }, { &vop_inactive_desc, (vop_t *) portal_inactive }, { &vop_islocked_desc, (vop_t *) vop_noislocked }, { &vop_lock_desc, (vop_t *) vop_nolock }, { &vop_lookup_desc, (vop_t *) portal_lookup }, { &vop_open_desc, (vop_t *) portal_open }, - { &vop_pathconf_desc, (vop_t *) portal_pathconf }, + { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, { &vop_print_desc, (vop_t *) portal_print }, { &vop_readdir_desc, (vop_t *) portal_readdir }, { &vop_reclaim_desc, (vop_t *) portal_reclaim }, - { &vop_seek_desc, (vop_t *) nullop }, { &vop_setattr_desc, (vop_t *) portal_setattr }, { &vop_unlock_desc, (vop_t *) vop_nounlock }, { NULL, NULL } diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c index ab62a4d801d1..8caf5fe76069 100644 --- a/sys/fs/procfs/procfs_vnops.c +++ b/sys/fs/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 *)); @@ -184,24 +182,6 @@ procfs_close(ap) return (0); } -/* - * 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 @@ -281,43 +261,6 @@ procfs_reclaim(ap) return (procfs_freevp(ap->a_vp)); } -/* - * 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 @@ -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 } }; diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 12a9f29f4eae..bdf769b957c3 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/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 @@ -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)); } } @@ -685,43 +681,6 @@ spec_print(ap) return (0); } -/* - * 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. */ diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 9358834e30a0..e1c9a878a0cc 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vnops.c 8.32 (Berkeley) 6/23/95 - * $Id: union_vnops.c,v 1.43 1997/10/15 09:21:32 phk Exp $ + * $Id: union_vnops.c,v 1.44 1997/10/15 10:04:54 phk Exp $ */ #include @@ -94,7 +94,6 @@ static int union_remove __P((struct vop_remove_args *ap)); static int union_rename __P((struct vop_rename_args *ap)); static int union_revoke __P((struct vop_revoke_args *ap)); static int union_rmdir __P((struct vop_rmdir_args *ap)); -static int union_seek __P((struct vop_seek_args *ap)); static int union_poll __P((struct vop_poll_args *ap)); static int union_setattr __P((struct vop_setattr_args *ap)); static int union_strategy __P((struct vop_strategy_args *ap)); @@ -1034,21 +1033,6 @@ union_fsync(ap) return (error); } -static int -union_seek(ap) - struct vop_seek_args /* { - struct vnode *a_vp; - off_t a_oldoff; - off_t a_newoff; - struct ucred *a_cred; - } */ *ap; -{ - register struct vnode *ovp = OTHERVP(ap->a_vp); - - ap->a_vp = ovp; - return (VCALL(ovp, VOFFSET(vop_seek), ap)); -} - static int union_remove(ap) struct vop_remove_args /* { @@ -1786,7 +1770,6 @@ static struct vnodeopv_entry_desc union_vnodeop_entries[] = { { &vop_rename_desc, (vop_t *) union_rename }, { &vop_revoke_desc, (vop_t *) union_revoke }, { &vop_rmdir_desc, (vop_t *) union_rmdir }, - { &vop_seek_desc, (vop_t *) union_seek }, { &vop_setattr_desc, (vop_t *) union_setattr }, { &vop_strategy_desc, (vop_t *) union_strategy }, { &vop_symlink_desc, (vop_t *) union_symlink }, diff --git a/sys/gnu/ext2fs/ext2_alloc.c b/sys/gnu/ext2fs/ext2_alloc.c index f78b6a5fa8be..ef0338d56219 100644 --- a/sys/gnu/ext2fs/ext2_alloc.c +++ b/sys/gnu/ext2fs/ext2_alloc.c @@ -349,7 +349,7 @@ return ENOSPC; ip->i_flag |= IN_CHANGE | IN_UPDATE; if (!doasyncfree) { gettime(&tv); - VOP_UPDATE(vp, &tv, &tv, MNT_WAIT); + UFS_UPDATE(vp, &tv, &tv, MNT_WAIT); } } if (ssize < len) diff --git a/sys/gnu/ext2fs/ext2_extern.h b/sys/gnu/ext2fs/ext2_extern.h index b185f5209956..d6b04d0bee56 100644 --- a/sys/gnu/ext2fs/ext2_extern.h +++ b/sys/gnu/ext2fs/ext2_extern.h @@ -62,7 +62,7 @@ int ext2_reallocblks __P((struct vop_reallocblks_args *)); int ext2_reclaim __P((struct vop_reclaim_args *)); void ext2_setblock __P((struct ext2_sb_info *, u_char *, daddr_t)); int ext2_truncate __P((struct vnode *, off_t, int, struct ucred *, struct proc *)); -int ext2_update __P((struct vop_update_args *)); +int ext2_update __P((struct vnode *, struct timeval *, struct timeval *, int)); int ext2_valloc __P((struct vnode *, int, struct ucred *, struct vnode **)); int ext2_vfree __P((struct vnode *, ino_t, int)); int ext2_lookup __P((struct vop_cachedlookup_args *)); diff --git a/sys/gnu/ext2fs/ext2_inode.c b/sys/gnu/ext2fs/ext2_inode.c index 05140227d57e..001fd2dcaf35 100644 --- a/sys/gnu/ext2fs/ext2_inode.c +++ b/sys/gnu/ext2fs/ext2_inode.c @@ -63,6 +63,7 @@ #include #include +#include #include #include @@ -89,13 +90,11 @@ ext2_init(struct vfsconf *vfsp) * complete. */ int -ext2_update(ap) - struct vop_update_args /* { - struct vnode *a_vp; - struct timeval *a_access; - struct timeval *a_modify; - int a_waitfor; - } */ *ap; +ext2_update(vp, access, modify, waitfor) + struct vnode *vp; + struct timeval *access; + struct timeval *modify; + int waitfor; { register struct ext2_sb_info *fs; struct buf *bp; @@ -105,8 +104,8 @@ ext2_update(ap) struct timeval time; #endif - ip = VTOI(ap->a_vp); - if (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY) { + ip = VTOI(vp); + if (vp->v_mount->mnt_flag & MNT_RDONLY) { ip->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE); return (0); @@ -115,9 +114,9 @@ ext2_update(ap) (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 0) return (0); if (ip->i_flag & IN_ACCESS) - ip->i_atime = ap->a_access->tv_sec; + ip->i_atime = access->tv_sec; if (ip->i_flag & IN_UPDATE) { - ip->i_mtime = ap->a_modify->tv_sec; + ip->i_mtime = modify->tv_sec; ip->i_modrev++; } if (ip->i_flag & IN_CHANGE) { @@ -137,7 +136,7 @@ ext2_update(ap) ext2_di2ei( &ip->i_din, (struct ext2_inode *) ((char *)bp->b_data + EXT2_INODE_SIZE * ino_to_fsbo(fs, ip->i_number))); /* - if (ap->a_waitfor && (ap->a_vp->v_mount->mnt_flag & MNT_ASYNC) == 0) + if (waitfor && (vp->v_mount->mnt_flag & MNT_ASYNC) == 0) return (bwrite(bp)); else { */ @@ -196,11 +195,11 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length); bzero((char *)&oip->i_shortlink, (u_int)oip->i_size); oip->i_size = 0; oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (VOP_UPDATE(ovp, &tv, &tv, 1)); + return (UFS_UPDATE(ovp, &tv, &tv, 1)); } if (oip->i_size == length) { oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (VOP_UPDATE(ovp, &tv, &tv, 0)); + return (UFS_UPDATE(ovp, &tv, &tv, 0)); } #if QUOTA if (error = getinoquota(oip)) @@ -233,7 +232,7 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length); else bawrite(bp); oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (VOP_UPDATE(ovp, &tv, &tv, 1)); + return (UFS_UPDATE(ovp, &tv, &tv, 1)); } /* * Shorten the size of the file. If the file is not being @@ -292,7 +291,7 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length); for (i = NDADDR - 1; i > lastblock; i--) oip->i_db[i] = 0; oip->i_flag |= IN_CHANGE | IN_UPDATE; - if (error = VOP_UPDATE(ovp, &tv, &tv, MNT_WAIT)) + if (error = UFS_UPDATE(ovp, &tv, &tv, MNT_WAIT)) allerror = error; /* * Having written the new inode to disk, save its new configuration diff --git a/sys/gnu/ext2fs/ext2_mount.h b/sys/gnu/ext2fs/ext2_mount.h index 50bfe575f51e..ee7963190c89 100644 --- a/sys/gnu/ext2fs/ext2_mount.h +++ b/sys/gnu/ext2fs/ext2_mount.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufsmount.h 8.6 (Berkeley) 3/30/95 - * $Id: ufsmount.h,v 1.10 1997/10/12 20:26:28 phk Exp $ + * $Id: ufsmount.h,v 1.11 1997/10/16 10:50:27 phk Exp $ */ #ifndef _UFS_UFS_UFSMOUNT_H_ @@ -99,12 +99,14 @@ struct ufsmount { struct malloc_type *um_malloctype; /* The inodes malloctype */ int (*um_blkatoff) __P((struct vnode *, off_t, char **, struct buf **)); int (*um_truncate) __P((struct vnode *, off_t, int, struct ucred *, struct proc *)); + int (*um_update) __P((struct vnode *, struct timeval *, struct timeval *, int)); int (*um_valloc) __P((struct vnode *, int, struct ucred *, struct vnode **)); int (*um_vfree) __P((struct vnode *, ino_t, int)); }; #define UFS_BLKATOFF(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_blkatoff(aa, bb, cc, dd) #define UFS_TRUNCATE(aa, bb, cc, dd, ee) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd, ee) +#define UFS_UPDATE(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_update(aa, bb, cc, dd) #define UFS_VALLOC(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_valloc(aa, bb, cc, dd) #define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)->v_mount)->um_vfree(aa, bb, cc) diff --git a/sys/gnu/ext2fs/ext2_readwrite.c b/sys/gnu/ext2fs/ext2_readwrite.c index e1ab5063f53e..d7489995dfe7 100644 --- a/sys/gnu/ext2fs/ext2_readwrite.c +++ b/sys/gnu/ext2fs/ext2_readwrite.c @@ -314,7 +314,7 @@ WRITE(ap) } } else if (resid > uio->uio_resid && (ioflag & IO_SYNC)) { gettime(&tv); - error = VOP_UPDATE(vp, &tv, &tv, 1); + error = UFS_UPDATE(vp, &tv, &tv, 1); } return (error); } diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index 95ffa52b74a1..7112758d6e0a 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -623,6 +623,7 @@ ext2_mountfs(devvp, mp, p) ump->um_malloctype = M_EXT2NODE; ump->um_blkatoff = ext2_blkatoff; ump->um_truncate = ext2_truncate; + ump->um_update = ext2_update; ump->um_valloc = ext2_valloc; ump->um_vfree = ext2_vfree; /* I don't know whether this is the right strategy. Note that diff --git a/sys/gnu/ext2fs/ext2_vnops.c b/sys/gnu/ext2fs/ext2_vnops.c index 48b59074acbb..2fc383e91b23 100644 --- a/sys/gnu/ext2fs/ext2_vnops.c +++ b/sys/gnu/ext2fs/ext2_vnops.c @@ -91,7 +91,6 @@ static struct vnodeopv_entry_desc ext2_vnodeop_entries[] = { { &vop_read_desc, (vop_t *) ext2_read }, { &vop_readdir_desc, (vop_t *) ext2_readdir }, { &vop_reallocblks_desc, (vop_t *) ext2_reallocblks }, - { &vop_update_desc, (vop_t *) ext2_update }, { &vop_write_desc, (vop_t *) ext2_write }, { NULL, NULL } }; @@ -103,7 +102,6 @@ static struct vnodeopv_entry_desc ext2_specop_entries[] = { { &vop_default_desc, (vop_t *) ufs_vnoperatespec }, { &vop_fsync_desc, (vop_t *) ext2_fsync }, { &vop_inactive_desc, (vop_t *) ext2_inactive }, - { &vop_update_desc, (vop_t *) ext2_update }, { NULL, NULL } }; static struct vnodeopv_desc ext2fs_specop_opv_desc = @@ -114,7 +112,6 @@ static struct vnodeopv_entry_desc ext2_fifoop_entries[] = { { &vop_default_desc, (vop_t *) ufs_vnoperatefifo }, { &vop_fsync_desc, (vop_t *) ext2_fsync }, { &vop_inactive_desc, (vop_t *) ext2_inactive }, - { &vop_update_desc, (vop_t *) ext2_update }, { NULL, NULL } }; static struct vnodeopv_desc ext2fs_fifoop_opv_desc = @@ -200,5 +197,5 @@ ext2_fsync(ap) } splx(s); gettime(&tv); - return (VOP_UPDATE(ap->a_vp, &tv, &tv, ap->a_waitfor == MNT_WAIT)); + return (UFS_UPDATE(ap->a_vp, &tv, &tv, ap->a_waitfor == MNT_WAIT)); } diff --git a/sys/gnu/fs/ext2fs/ext2_alloc.c b/sys/gnu/fs/ext2fs/ext2_alloc.c index f78b6a5fa8be..ef0338d56219 100644 --- a/sys/gnu/fs/ext2fs/ext2_alloc.c +++ b/sys/gnu/fs/ext2fs/ext2_alloc.c @@ -349,7 +349,7 @@ return ENOSPC; ip->i_flag |= IN_CHANGE | IN_UPDATE; if (!doasyncfree) { gettime(&tv); - VOP_UPDATE(vp, &tv, &tv, MNT_WAIT); + UFS_UPDATE(vp, &tv, &tv, MNT_WAIT); } } if (ssize < len) diff --git a/sys/gnu/fs/ext2fs/ext2_extern.h b/sys/gnu/fs/ext2fs/ext2_extern.h index b185f5209956..d6b04d0bee56 100644 --- a/sys/gnu/fs/ext2fs/ext2_extern.h +++ b/sys/gnu/fs/ext2fs/ext2_extern.h @@ -62,7 +62,7 @@ int ext2_reallocblks __P((struct vop_reallocblks_args *)); int ext2_reclaim __P((struct vop_reclaim_args *)); void ext2_setblock __P((struct ext2_sb_info *, u_char *, daddr_t)); int ext2_truncate __P((struct vnode *, off_t, int, struct ucred *, struct proc *)); -int ext2_update __P((struct vop_update_args *)); +int ext2_update __P((struct vnode *, struct timeval *, struct timeval *, int)); int ext2_valloc __P((struct vnode *, int, struct ucred *, struct vnode **)); int ext2_vfree __P((struct vnode *, ino_t, int)); int ext2_lookup __P((struct vop_cachedlookup_args *)); diff --git a/sys/gnu/fs/ext2fs/ext2_inode.c b/sys/gnu/fs/ext2fs/ext2_inode.c index 05140227d57e..001fd2dcaf35 100644 --- a/sys/gnu/fs/ext2fs/ext2_inode.c +++ b/sys/gnu/fs/ext2fs/ext2_inode.c @@ -63,6 +63,7 @@ #include #include +#include #include #include @@ -89,13 +90,11 @@ ext2_init(struct vfsconf *vfsp) * complete. */ int -ext2_update(ap) - struct vop_update_args /* { - struct vnode *a_vp; - struct timeval *a_access; - struct timeval *a_modify; - int a_waitfor; - } */ *ap; +ext2_update(vp, access, modify, waitfor) + struct vnode *vp; + struct timeval *access; + struct timeval *modify; + int waitfor; { register struct ext2_sb_info *fs; struct buf *bp; @@ -105,8 +104,8 @@ ext2_update(ap) struct timeval time; #endif - ip = VTOI(ap->a_vp); - if (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY) { + ip = VTOI(vp); + if (vp->v_mount->mnt_flag & MNT_RDONLY) { ip->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE); return (0); @@ -115,9 +114,9 @@ ext2_update(ap) (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) == 0) return (0); if (ip->i_flag & IN_ACCESS) - ip->i_atime = ap->a_access->tv_sec; + ip->i_atime = access->tv_sec; if (ip->i_flag & IN_UPDATE) { - ip->i_mtime = ap->a_modify->tv_sec; + ip->i_mtime = modify->tv_sec; ip->i_modrev++; } if (ip->i_flag & IN_CHANGE) { @@ -137,7 +136,7 @@ ext2_update(ap) ext2_di2ei( &ip->i_din, (struct ext2_inode *) ((char *)bp->b_data + EXT2_INODE_SIZE * ino_to_fsbo(fs, ip->i_number))); /* - if (ap->a_waitfor && (ap->a_vp->v_mount->mnt_flag & MNT_ASYNC) == 0) + if (waitfor && (vp->v_mount->mnt_flag & MNT_ASYNC) == 0) return (bwrite(bp)); else { */ @@ -196,11 +195,11 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length); bzero((char *)&oip->i_shortlink, (u_int)oip->i_size); oip->i_size = 0; oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (VOP_UPDATE(ovp, &tv, &tv, 1)); + return (UFS_UPDATE(ovp, &tv, &tv, 1)); } if (oip->i_size == length) { oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (VOP_UPDATE(ovp, &tv, &tv, 0)); + return (UFS_UPDATE(ovp, &tv, &tv, 0)); } #if QUOTA if (error = getinoquota(oip)) @@ -233,7 +232,7 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length); else bawrite(bp); oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (VOP_UPDATE(ovp, &tv, &tv, 1)); + return (UFS_UPDATE(ovp, &tv, &tv, 1)); } /* * Shorten the size of the file. If the file is not being @@ -292,7 +291,7 @@ printf("ext2_truncate called %d to %d\n", VTOI(ovp)->i_number, length); for (i = NDADDR - 1; i > lastblock; i--) oip->i_db[i] = 0; oip->i_flag |= IN_CHANGE | IN_UPDATE; - if (error = VOP_UPDATE(ovp, &tv, &tv, MNT_WAIT)) + if (error = UFS_UPDATE(ovp, &tv, &tv, MNT_WAIT)) allerror = error; /* * Having written the new inode to disk, save its new configuration diff --git a/sys/gnu/fs/ext2fs/ext2_mount.h b/sys/gnu/fs/ext2fs/ext2_mount.h index 50bfe575f51e..ee7963190c89 100644 --- a/sys/gnu/fs/ext2fs/ext2_mount.h +++ b/sys/gnu/fs/ext2fs/ext2_mount.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufsmount.h 8.6 (Berkeley) 3/30/95 - * $Id: ufsmount.h,v 1.10 1997/10/12 20:26:28 phk Exp $ + * $Id: ufsmount.h,v 1.11 1997/10/16 10:50:27 phk Exp $ */ #ifndef _UFS_UFS_UFSMOUNT_H_ @@ -99,12 +99,14 @@ struct ufsmount { struct malloc_type *um_malloctype; /* The inodes malloctype */ int (*um_blkatoff) __P((struct vnode *, off_t, char **, struct buf **)); int (*um_truncate) __P((struct vnode *, off_t, int, struct ucred *, struct proc *)); + int (*um_update) __P((struct vnode *, struct timeval *, struct timeval *, int)); int (*um_valloc) __P((struct vnode *, int, struct ucred *, struct vnode **)); int (*um_vfree) __P((struct vnode *, ino_t, int)); }; #define UFS_BLKATOFF(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_blkatoff(aa, bb, cc, dd) #define UFS_TRUNCATE(aa, bb, cc, dd, ee) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd, ee) +#define UFS_UPDATE(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_update(aa, bb, cc, dd) #define UFS_VALLOC(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_valloc(aa, bb, cc, dd) #define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)->v_mount)->um_vfree(aa, bb, cc) diff --git a/sys/gnu/fs/ext2fs/ext2_readwrite.c b/sys/gnu/fs/ext2fs/ext2_readwrite.c index e1ab5063f53e..d7489995dfe7 100644 --- a/sys/gnu/fs/ext2fs/ext2_readwrite.c +++ b/sys/gnu/fs/ext2fs/ext2_readwrite.c @@ -314,7 +314,7 @@ WRITE(ap) } } else if (resid > uio->uio_resid && (ioflag & IO_SYNC)) { gettime(&tv); - error = VOP_UPDATE(vp, &tv, &tv, 1); + error = UFS_UPDATE(vp, &tv, &tv, 1); } return (error); } diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 95ffa52b74a1..7112758d6e0a 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -623,6 +623,7 @@ ext2_mountfs(devvp, mp, p) ump->um_malloctype = M_EXT2NODE; ump->um_blkatoff = ext2_blkatoff; ump->um_truncate = ext2_truncate; + ump->um_update = ext2_update; ump->um_valloc = ext2_valloc; ump->um_vfree = ext2_vfree; /* I don't know whether this is the right strategy. Note that diff --git a/sys/gnu/fs/ext2fs/ext2_vnops.c b/sys/gnu/fs/ext2fs/ext2_vnops.c index 48b59074acbb..2fc383e91b23 100644 --- a/sys/gnu/fs/ext2fs/ext2_vnops.c +++ b/sys/gnu/fs/ext2fs/ext2_vnops.c @@ -91,7 +91,6 @@ static struct vnodeopv_entry_desc ext2_vnodeop_entries[] = { { &vop_read_desc, (vop_t *) ext2_read }, { &vop_readdir_desc, (vop_t *) ext2_readdir }, { &vop_reallocblks_desc, (vop_t *) ext2_reallocblks }, - { &vop_update_desc, (vop_t *) ext2_update }, { &vop_write_desc, (vop_t *) ext2_write }, { NULL, NULL } }; @@ -103,7 +102,6 @@ static struct vnodeopv_entry_desc ext2_specop_entries[] = { { &vop_default_desc, (vop_t *) ufs_vnoperatespec }, { &vop_fsync_desc, (vop_t *) ext2_fsync }, { &vop_inactive_desc, (vop_t *) ext2_inactive }, - { &vop_update_desc, (vop_t *) ext2_update }, { NULL, NULL } }; static struct vnodeopv_desc ext2fs_specop_opv_desc = @@ -114,7 +112,6 @@ static struct vnodeopv_entry_desc ext2_fifoop_entries[] = { { &vop_default_desc, (vop_t *) ufs_vnoperatefifo }, { &vop_fsync_desc, (vop_t *) ext2_fsync }, { &vop_inactive_desc, (vop_t *) ext2_inactive }, - { &vop_update_desc, (vop_t *) ext2_update }, { NULL, NULL } }; static struct vnodeopv_desc ext2fs_fifoop_opv_desc = @@ -200,5 +197,5 @@ ext2_fsync(ap) } splx(s); gettime(&tv); - return (VOP_UPDATE(ap->a_vp, &tv, &tv, ap->a_waitfor == MNT_WAIT)); + return (UFS_UPDATE(ap->a_vp, &tv, &tv, ap->a_waitfor == MNT_WAIT)); } diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index b794436451fb..031832487ed5 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vnops.c 8.19 (Berkeley) 5/27/95 - * $Id: cd9660_vnops.c,v 1.43 1997/10/15 13:22:39 phk Exp $ + * $Id: cd9660_vnops.c,v 1.44 1997/10/16 10:47:47 phk Exp $ */ #include @@ -59,14 +59,9 @@ #include static int cd9660_setattr __P((struct vop_setattr_args *)); -static int cd9660_open __P((struct vop_open_args *)); -static int cd9660_close __P((struct vop_close_args *)); static int cd9660_access __P((struct vop_access_args *)); static int cd9660_getattr __P((struct vop_getattr_args *)); static int cd9660_read __P((struct vop_read_args *)); -static int cd9660_ioctl __P((struct vop_ioctl_args *)); -static int cd9660_mmap __P((struct vop_mmap_args *)); -static int cd9660_seek __P((struct vop_seek_args *)); struct isoreaddir; static int iso_uiodir __P((struct isoreaddir *idp, struct dirent *dp, off_t off)); @@ -117,42 +112,6 @@ cd9660_setattr(ap) return (0); } -/* - * Open called. - * - * Nothing to do. - */ -/* ARGSUSED */ -static int -cd9660_open(ap) - struct vop_open_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - return (0); -} - -/* - * Close called - * - * Update the times on the inode on writeable file systems. - */ -/* ARGSUSED */ -static int -cd9660_close(ap) - struct vop_close_args /* { - struct vnode *a_vp; - int a_fflag; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - return (0); -} - /* * Check mode permission on inode pointer. Mode is READ, WRITE or EXEC. * The mode is shifted to select the owner/group/other fields. The @@ -357,60 +316,6 @@ cd9660_read(ap) return (error); } -/* ARGSUSED */ -static int -cd9660_ioctl(ap) - struct vop_ioctl_args /* { - struct vnode *a_vp; - u_long a_command; - caddr_t a_data; - int a_fflag; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - printf("You did ioctl for isofs !!\n"); - return (ENOTTY); -} - -/* - * Mmap a file - * - * NB Currently unsupported. - */ -/* ARGSUSED */ -static int -cd9660_mmap(ap) - struct vop_mmap_args /* { - struct vnode *a_vp; - int a_fflags; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - - return (EINVAL); -} - -/* - * Seek on a file - * - * Nothing to do, so just return. - */ -/* ARGSUSED */ -static int -cd9660_seek(ap) - struct vop_seek_args /* { - struct vnode *a_vp; - off_t a_oldoff; - off_t a_newoff; - struct ucred *a_cred; - } */ *ap; -{ - - return (0); -} - /* * Structure for reading directories */ @@ -962,23 +867,17 @@ struct vnodeopv_entry_desc cd9660_vnodeop_entries[] = { { &vop_access_desc, (vop_t *) cd9660_access }, { &vop_bmap_desc, (vop_t *) cd9660_bmap }, { &vop_cachedlookup_desc, (vop_t *) cd9660_lookup }, - { &vop_close_desc, (vop_t *) cd9660_close }, - { &vop_fsync_desc, (vop_t *) nullop }, { &vop_getattr_desc, (vop_t *) cd9660_getattr }, { &vop_inactive_desc, (vop_t *) cd9660_inactive }, - { &vop_ioctl_desc, (vop_t *) cd9660_ioctl }, { &vop_islocked_desc, (vop_t *) cd9660_islocked }, { &vop_lock_desc, (vop_t *) cd9660_lock }, { &vop_lookup_desc, (vop_t *) vfs_cache_lookup }, - { &vop_mmap_desc, (vop_t *) cd9660_mmap }, - { &vop_open_desc, (vop_t *) cd9660_open }, { &vop_pathconf_desc, (vop_t *) cd9660_pathconf }, { &vop_print_desc, (vop_t *) cd9660_print }, { &vop_read_desc, (vop_t *) cd9660_read }, { &vop_readdir_desc, (vop_t *) cd9660_readdir }, { &vop_readlink_desc, (vop_t *) cd9660_readlink }, { &vop_reclaim_desc, (vop_t *) cd9660_reclaim }, - { &vop_seek_desc, (vop_t *) cd9660_seek }, { &vop_setattr_desc, (vop_t *) cd9660_setattr }, { &vop_strategy_desc, (vop_t *) cd9660_strategy }, { &vop_unlock_desc, (vop_t *) cd9660_unlock }, diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 0c1f2a6b1868..8583b55cb6d0 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -41,9 +41,9 @@ #include #include #include +#include #include -int vop_notsupp __P((struct vop_generic_args *ap)); static int vop_nostrategy __P((struct vop_strategy_args *)); /* @@ -56,11 +56,20 @@ static int vop_nostrategy __P((struct vop_strategy_args *)); vop_t **default_vnodeop_p; static struct vnodeopv_entry_desc default_vnodeop_entries[] = { - { &vop_default_desc, (vop_t *) vop_notsupp }, + { &vop_default_desc, (vop_t *) vop_eopnotsupp }, { &vop_abortop_desc, (vop_t *) nullop }, + { &vop_advlock_desc, (vop_t *) vop_einval }, { &vop_bwrite_desc, (vop_t *) vn_bwrite }, + { &vop_close_desc, (vop_t *) vop_null }, + { &vop_fsync_desc, (vop_t *) vop_null }, + { &vop_ioctl_desc, (vop_t *) vop_enotty }, { &vop_lease_desc, (vop_t *) lease_check }, + { &vop_mmap_desc, (vop_t *) vop_einval }, + { &vop_open_desc, (vop_t *) vop_null }, + { &vop_pathconf_desc, (vop_t *) vop_einval }, { &vop_poll_desc, (vop_t *) vop_nopoll }, + { &vop_readlink_desc, (vop_t *) vop_einval }, + { &vop_reallocblks_desc, (vop_t *) vop_eopnotsupp }, { &vop_revoke_desc, (vop_t *) vop_revoke }, { &vop_strategy_desc, (vop_t *) vop_nostrategy }, { NULL, NULL } @@ -72,23 +81,50 @@ static struct vnodeopv_desc default_vnodeop_opv_desc = VNODEOP_SET(default_vnodeop_opv_desc); int -vop_notsupp(struct vop_generic_args *ap) +vop_eopnotsupp(struct vop_generic_args *ap) { /* - printf("vn_notsupp[%s]\n", ap->a_desc->vdesc_name); + printf("vop_notsupp[%s]\n", ap->a_desc->vdesc_name); */ return (EOPNOTSUPP); } int -vn_defaultop(struct vop_generic_args *ap) +vop_ebadf(struct vop_generic_args *ap) +{ + + return (EBADF); +} + +int +vop_enotty(struct vop_generic_args *ap) +{ + + return (ENOTTY); +} + +int +vop_einval(struct vop_generic_args *ap) +{ + + return (EINVAL); +} + +int +vop_null(struct vop_generic_args *ap) +{ + + return (0); +} + +int +vop_defaultop(struct vop_generic_args *ap) { return (VOCALL(default_vnodeop_p, ap->a_desc->vdesc_offset, ap)); } - static int vop_nostrategy (struct vop_strategy_args *ap) { @@ -99,3 +135,37 @@ vop_nostrategy (struct vop_strategy_args *ap) biodone(ap->a_bp); return (EOPNOTSUPP); } + +int +vop_stdpathconf(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 */ +} diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index c91c9f34756c..bedf27422475 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -31,7 +31,7 @@ # SUCH DAMAGE. # # @(#)vnode_if.src 8.12 (Berkeley) 5/14/95 -# $Id: vnode_if.src,v 1.13 1997/09/14 02:35:25 peter Exp $ +# $Id: vnode_if.src,v 1.14 1997/10/16 10:48:00 phk Exp $ # # @@ -239,17 +239,6 @@ vop_fsync { IN struct proc *p; }; -# -# XXX - not used -# Needs work: Is newoff right? What's it mean? -# -vop_seek { - IN struct vnode *vp; - IN off_t oldoff; - IN off_t newoff; - IN struct ucred *cred; -}; - # #% remove dvp L U U #% remove vp L U U @@ -447,16 +436,6 @@ vop_reallocblks { IN struct cluster_save *buflist; }; -# -#% update vp L L L -# -vop_update { - IN struct vnode *vp; - IN struct timeval *access; - IN struct timeval *modify; - IN int waitfor; -}; - vop_getpages { IN struct vnode *vp; IN vm_page_t *m; diff --git a/sys/miscfs/deadfs/dead_vnops.c b/sys/miscfs/deadfs/dead_vnops.c index 3c411307ae0c..051977f3da87 100644 --- a/sys/miscfs/deadfs/dead_vnops.c +++ b/sys/miscfs/deadfs/dead_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)dead_vnops.c 8.1 (Berkeley) 6/10/93 - * $Id: dead_vnops.c,v 1.17 1997/10/15 10:04:03 phk Exp $ + * $Id: dead_vnops.c,v 1.18 1997/10/16 10:48:06 phk Exp $ */ #include @@ -61,9 +61,7 @@ static struct vnodeopv_entry_desc dead_vnodeop_entries[] = { { &vop_access_desc, (vop_t *) dead_ebadf }, { &vop_advlock_desc, (vop_t *) dead_ebadf }, { &vop_bmap_desc, (vop_t *) dead_bmap }, - { &vop_close_desc, (vop_t *) nullop }, { &vop_create_desc, (vop_t *) dead_badop }, - { &vop_fsync_desc, (vop_t *) nullop }, { &vop_getattr_desc, (vop_t *) dead_ebadf }, { &vop_inactive_desc, (vop_t *) nullop }, { &vop_ioctl_desc, (vop_t *) dead_ioctl }, @@ -75,7 +73,7 @@ static struct vnodeopv_entry_desc dead_vnodeop_entries[] = { { &vop_mknod_desc, (vop_t *) dead_badop }, { &vop_mmap_desc, (vop_t *) dead_badop }, { &vop_open_desc, (vop_t *) dead_open }, - { &vop_pathconf_desc, (vop_t *) dead_ebadf }, + { &vop_pathconf_desc, (vop_t *) dead_ebadf }, /* per pathconf(2) */ { &vop_print_desc, (vop_t *) dead_print }, { &vop_read_desc, (vop_t *) dead_read }, { &vop_readdir_desc, (vop_t *) dead_ebadf }, @@ -84,11 +82,9 @@ static struct vnodeopv_entry_desc dead_vnodeop_entries[] = { { &vop_remove_desc, (vop_t *) dead_badop }, { &vop_rename_desc, (vop_t *) dead_badop }, { &vop_rmdir_desc, (vop_t *) dead_badop }, - { &vop_seek_desc, (vop_t *) nullop }, { &vop_setattr_desc, (vop_t *) dead_ebadf }, { &vop_symlink_desc, (vop_t *) dead_badop }, { &vop_unlock_desc, (vop_t *) vop_nounlock }, - { &vop_update_desc, (vop_t *) nullop }, { &vop_write_desc, (vop_t *) dead_write }, { NULL, NULL } }; diff --git a/sys/miscfs/devfs/devfs_vnops.c b/sys/miscfs/devfs/devfs_vnops.c index 5ab722ca42e6..6bbf46d07685 100644 --- a/sys/miscfs/devfs/devfs_vnops.c +++ b/sys/miscfs/devfs/devfs_vnops.c @@ -1,7 +1,7 @@ /* * Written by Julian Elischer (julian@DIALix.oz.au) * - * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v 1.43 1997/10/15 13:23:01 phk Exp $ + * $Header: /home/ncvs/src/sys/miscfs/devfs/devfs_vnops.c,v 1.44 1997/10/16 10:48:12 phk Exp $ * * symlinks can wait 'til later. */ @@ -345,34 +345,6 @@ DBPRINT(("mknod\n")); } #endif /* notyet */ -static int -devfs_open(struct vop_open_args *ap) - /*struct vop_open_args { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct proc *a_p; - } */ -{ -DBPRINT(("open\n")); - return 0; -} - -#ifdef notyet -static int -devfs_close( struct vop_close_args *ap) - /*struct vop_close_args { - struct vnode *a_vp; - int a_fflag; - struct ucred *a_cred; - struct proc *a_p; - } */ -{ -DBPRINT(("close\n")); - return 0; -} -#endif /* notyet */ - static int devfs_access(struct vop_access_args *ap) /*struct vop_access_args { @@ -763,47 +735,7 @@ DBPRINT(("select\n")); return 1; /* filesystems never block? */ } -static int -devfs_mmap(struct vop_mmap_args *ap) - /*struct vop_mmap_args { - struct vnode *a_vp; - int a_fflags; - struct ucred *a_cred; - struct proc *a_p; - } */ -{ -DBPRINT(("mmap\n")); - return EINVAL; -} -/* - * Flush the blocks of a file to disk. - */ -static int -devfs_fsync(struct vop_fsync_args *ap) - /*struct vop_fsync_args { - struct vnode *a_vp; - struct ucred *a_cred; - int a_waitfor; - struct proc *a_p; - } */ -{ -DBPRINT(("fsync\n")); - return(0); -} - -static int -devfs_seek(struct vop_seek_args *ap) - /*struct vop_seek_args { - struct vnode *a_vp; - off_t a_oldoff; - off_t a_newoff; - struct ucred *a_cred; - } */ -{ -DBPRINT(("seek\n")); - return 0; -} #endif /* notyet */ static int @@ -1524,44 +1456,6 @@ DBPRINT(("reclaim\n")); return(0); } -/* - * Return POSIX pathconf information applicable to special devices. - */ -static int -devfs_pathconf(struct vop_pathconf_args *ap) - /*struct vop_pathconf_args { - struct vnode *a_vp; - int a_name; - int *a_retval; - } */ -{ - - 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 out the contents of a /devfs vnode. */ @@ -1629,19 +1523,15 @@ devfs_dropvnode(dn_p dnp) vop_t **devfs_vnodeop_p; static struct vnodeopv_entry_desc devfs_vnodeop_entries[] = { { &vop_default_desc, (vop_t *) vn_default_error }, - { &vop_abortop_desc, (vop_t *) nullop }, { &vop_access_desc, (vop_t *) devfs_access }, { &vop_bmap_desc, (vop_t *) devfs_badop }, - { &vop_close_desc, (vop_t *) nullop }, - { &vop_fsync_desc, (vop_t *) nullop }, { &vop_getattr_desc, (vop_t *) devfs_getattr }, { &vop_inactive_desc, (vop_t *) devfs_inactive }, { &vop_islocked_desc, (vop_t *) vop_noislocked }, { &vop_link_desc, (vop_t *) devfs_link }, { &vop_lock_desc, (vop_t *) vop_nolock }, { &vop_lookup_desc, (vop_t *) devfs_lookup }, - { &vop_open_desc, (vop_t *) devfs_open }, - { &vop_pathconf_desc, (vop_t *) devfs_pathconf }, + { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, { &vop_print_desc, (vop_t *) devfs_print }, { &vop_read_desc, (vop_t *) devfs_read }, { &vop_readdir_desc, (vop_t *) devfs_readdir }, @@ -1649,7 +1539,6 @@ static struct vnodeopv_entry_desc devfs_vnodeop_entries[] = { { &vop_reclaim_desc, (vop_t *) devfs_reclaim }, { &vop_remove_desc, (vop_t *) devfs_remove }, { &vop_rename_desc, (vop_t *) devfs_rename }, - { &vop_seek_desc, (vop_t *) nullop }, { &vop_setattr_desc, (vop_t *) devfs_setattr }, { &vop_symlink_desc, (vop_t *) devfs_symlink }, { &vop_unlock_desc, (vop_t *) vop_nounlock }, diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c index 7793177e5db2..ccc5e5b60797 100644 --- a/sys/miscfs/fdesc/fdesc_vnops.c +++ b/sys/miscfs/fdesc/fdesc_vnops.c @@ -35,7 +35,7 @@ * * @(#)fdesc_vnops.c 8.9 (Berkeley) 1/21/94 * - * $Id: fdesc_vnops.c,v 1.28 1997/10/15 10:04:12 phk Exp $ + * $Id: fdesc_vnops.c,v 1.29 1997/10/16 10:48:18 phk Exp $ */ /* @@ -91,7 +91,6 @@ static int fdesc_inactive __P((struct vop_inactive_args *ap)); static int fdesc_ioctl __P((struct vop_ioctl_args *ap)); static int fdesc_lookup __P((struct vop_lookup_args *ap)); static int fdesc_open __P((struct vop_open_args *ap)); -static int fdesc_pathconf __P((struct vop_pathconf_args *ap)); static int fdesc_print __P((struct vop_print_args *ap)); static int fdesc_read __P((struct vop_read_args *ap)); static int fdesc_readdir __P((struct vop_readdir_args *ap)); @@ -830,43 +829,6 @@ fdesc_reclaim(ap) return (0); } -/* - * Return POSIX pathconf information applicable to special devices. - */ -static int -fdesc_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 out the contents of a /dev/fd vnode. */ @@ -897,8 +859,6 @@ static struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = { { &vop_default_desc, (vop_t *) vn_default_error }, { &vop_access_desc, (vop_t *) nullop }, { &vop_bmap_desc, (vop_t *) fdesc_badop }, - { &vop_close_desc, (vop_t *) nullop }, - { &vop_fsync_desc, (vop_t *) nullop }, { &vop_getattr_desc, (vop_t *) fdesc_getattr }, { &vop_inactive_desc, (vop_t *) fdesc_inactive }, { &vop_ioctl_desc, (vop_t *) fdesc_ioctl }, @@ -906,14 +866,13 @@ static struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = { { &vop_lock_desc, (vop_t *) vop_nolock }, { &vop_lookup_desc, (vop_t *) fdesc_lookup }, { &vop_open_desc, (vop_t *) fdesc_open }, - { &vop_pathconf_desc, (vop_t *) fdesc_pathconf }, + { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, { &vop_poll_desc, (vop_t *) fdesc_poll }, { &vop_print_desc, (vop_t *) fdesc_print }, { &vop_read_desc, (vop_t *) fdesc_read }, { &vop_readdir_desc, (vop_t *) fdesc_readdir }, { &vop_readlink_desc, (vop_t *) fdesc_readlink }, { &vop_reclaim_desc, (vop_t *) fdesc_reclaim }, - { &vop_seek_desc, (vop_t *) nullop }, { &vop_setattr_desc, (vop_t *) fdesc_setattr }, { &vop_unlock_desc, (vop_t *) vop_nounlock }, { &vop_write_desc, (vop_t *) fdesc_write }, diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c index 0b157a545223..8c46042585c3 100644 --- a/sys/miscfs/fifofs/fifo_vnops.c +++ b/sys/miscfs/fifofs/fifo_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)fifo_vnops.c 8.10 (Berkeley) 5/27/95 - * $Id: fifo_vnops.c,v 1.31 1997/10/15 13:23:12 phk Exp $ + * $Id: fifo_vnops.c,v 1.32 1997/10/16 10:48:25 phk Exp $ */ #include @@ -72,7 +72,6 @@ static int fifo_ioctl __P((struct vop_ioctl_args *)); static int fifo_poll __P((struct vop_poll_args *)); static int fifo_inactive __P((struct vop_inactive_args *)); static int fifo_bmap __P((struct vop_bmap_args *)); -static int fifo_pathconf __P((struct vop_pathconf_args *)); static int fifo_advlock __P((struct vop_advlock_args *)); @@ -85,7 +84,6 @@ static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = { { &vop_bmap_desc, (vop_t *) fifo_bmap }, { &vop_close_desc, (vop_t *) fifo_close }, { &vop_create_desc, (vop_t *) fifo_badop }, - { &vop_fsync_desc, (vop_t *) nullop }, { &vop_getattr_desc, (vop_t *) fifo_ebadf }, { &vop_inactive_desc, (vop_t *) fifo_inactive }, { &vop_ioctl_desc, (vop_t *) fifo_ioctl }, @@ -96,9 +94,8 @@ static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = { { &vop_lookup_desc, (vop_t *) fifo_lookup }, { &vop_mkdir_desc, (vop_t *) fifo_badop }, { &vop_mknod_desc, (vop_t *) fifo_badop }, - { &vop_mmap_desc, (vop_t *) fifo_badop }, { &vop_open_desc, (vop_t *) fifo_open }, - { &vop_pathconf_desc, (vop_t *) fifo_pathconf }, + { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, { &vop_poll_desc, (vop_t *) fifo_poll }, { &vop_print_desc, (vop_t *) fifo_print }, { &vop_read_desc, (vop_t *) fifo_read }, @@ -109,11 +106,9 @@ static struct vnodeopv_entry_desc fifo_vnodeop_entries[] = { { &vop_remove_desc, (vop_t *) fifo_badop }, { &vop_rename_desc, (vop_t *) fifo_badop }, { &vop_rmdir_desc, (vop_t *) fifo_badop }, - { &vop_seek_desc, (vop_t *) fifo_badop }, { &vop_setattr_desc, (vop_t *) fifo_ebadf }, { &vop_symlink_desc, (vop_t *) fifo_badop }, { &vop_unlock_desc, (vop_t *) vop_nounlock }, - { &vop_update_desc, (vop_t *) nullop }, { &vop_write_desc, (vop_t *) fifo_write }, { NULL, NULL } }; @@ -492,34 +487,6 @@ fifo_print(ap) return (0); } -/* - * Return POSIX pathconf information applicable to fifo's. - */ -static int -fifo_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_PIPE_BUF: - *ap->a_retval = PIPE_BUF; - return (0); - case _PC_CHOWN_RESTRICTED: - *ap->a_retval = 1; - return (0); - default: - return (EINVAL); - } - /* NOTREACHED */ -} - /* * Fifo failed operation */ diff --git a/sys/miscfs/kernfs/kernfs_vnops.c b/sys/miscfs/kernfs/kernfs_vnops.c index 3eea65ca24e2..578094fcc7c5 100644 --- a/sys/miscfs/kernfs/kernfs_vnops.c +++ b/sys/miscfs/kernfs/kernfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)kernfs_vnops.c 8.15 (Berkeley) 5/21/95 - * $Id: kernfs_vnops.c,v 1.23 1997/10/15 10:04:23 phk Exp $ + * $Id: kernfs_vnops.c,v 1.24 1997/10/16 10:48:29 phk Exp $ */ /* @@ -109,7 +109,6 @@ static int kernfs_enotsupp __P((void)); static int kernfs_getattr __P((struct vop_getattr_args *ap)); static int kernfs_inactive __P((struct vop_inactive_args *ap)); static int kernfs_lookup __P((struct vop_lookup_args *ap)); -static int kernfs_open __P((struct vop_open_args *ap)); static int kernfs_pathconf __P((struct vop_pathconf_args *ap)); static int kernfs_print __P((struct vop_print_args *ap)); static int kernfs_read __P((struct vop_read_args *ap)); @@ -315,20 +314,6 @@ kernfs_lookup(ap) return (0); } -static int -kernfs_open(ap) - struct vop_open_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - - /* Only need to check access permissions. */ - return (0); -} - static int kernfs_access(ap) struct vop_access_args /* { @@ -636,42 +621,6 @@ kernfs_reclaim(ap) return (0); } -/* - * Return POSIX pathconf information applicable to special devices. - */ -static int -kernfs_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 out the contents of a kernfs vnode. @@ -703,20 +652,16 @@ static struct vnodeopv_entry_desc kernfs_vnodeop_entries[] = { { &vop_default_desc, (vop_t *) vn_default_error }, { &vop_access_desc, (vop_t *) kernfs_access }, { &vop_bmap_desc, (vop_t *) kernfs_badop }, - { &vop_close_desc, (vop_t *) nullop }, - { &vop_fsync_desc, (vop_t *) nullop }, { &vop_getattr_desc, (vop_t *) kernfs_getattr }, { &vop_inactive_desc, (vop_t *) kernfs_inactive }, { &vop_islocked_desc, (vop_t *) vop_noislocked }, { &vop_lock_desc, (vop_t *) vop_nolock }, { &vop_lookup_desc, (vop_t *) kernfs_lookup }, - { &vop_open_desc, (vop_t *) kernfs_open }, - { &vop_pathconf_desc, (vop_t *) kernfs_pathconf }, + { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, { &vop_print_desc, (vop_t *) kernfs_print }, { &vop_read_desc, (vop_t *) kernfs_read }, { &vop_readdir_desc, (vop_t *) kernfs_readdir }, { &vop_reclaim_desc, (vop_t *) kernfs_reclaim }, - { &vop_seek_desc, (vop_t *) nullop }, { &vop_setattr_desc, (vop_t *) kernfs_setattr }, { &vop_unlock_desc, (vop_t *) vop_nounlock }, { &vop_write_desc, (vop_t *) kernfs_write }, diff --git a/sys/miscfs/portal/portal_vnops.c b/sys/miscfs/portal/portal_vnops.c index d8c2230deba7..df35f0c7fafa 100644 --- a/sys/miscfs/portal/portal_vnops.c +++ b/sys/miscfs/portal/portal_vnops.c @@ -35,7 +35,7 @@ * * @(#)portal_vnops.c 8.14 (Berkeley) 5/21/95 * - * $Id: portal_vnops.c,v 1.23 1997/10/15 10:04:34 phk Exp $ + * $Id: portal_vnops.c,v 1.24 1997/10/16 10:48:35 phk Exp $ */ /* @@ -73,7 +73,6 @@ static int portal_getattr __P((struct vop_getattr_args *ap)); static int portal_inactive __P((struct vop_inactive_args *ap)); static int portal_lookup __P((struct vop_lookup_args *ap)); static int portal_open __P((struct vop_open_args *ap)); -static int portal_pathconf __P((struct vop_pathconf_args *ap)); static int portal_print __P((struct vop_print_args *ap)); static int portal_readdir __P((struct vop_readdir_args *ap)); static int portal_reclaim __P((struct vop_reclaim_args *ap)); @@ -559,42 +558,6 @@ portal_reclaim(ap) return (0); } -/* - * Return POSIX pathconf information applicable to special devices. - */ -static int -portal_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 out the contents of a Portal vnode. @@ -638,19 +601,16 @@ static struct vnodeopv_entry_desc portal_vnodeop_entries[] = { { &vop_default_desc, (vop_t *) vn_default_error }, { &vop_access_desc, (vop_t *) nullop }, { &vop_bmap_desc, (vop_t *) portal_badop }, - { &vop_close_desc, (vop_t *) nullop }, - { &vop_fsync_desc, (vop_t *) nullop }, { &vop_getattr_desc, (vop_t *) portal_getattr }, { &vop_inactive_desc, (vop_t *) portal_inactive }, { &vop_islocked_desc, (vop_t *) vop_noislocked }, { &vop_lock_desc, (vop_t *) vop_nolock }, { &vop_lookup_desc, (vop_t *) portal_lookup }, { &vop_open_desc, (vop_t *) portal_open }, - { &vop_pathconf_desc, (vop_t *) portal_pathconf }, + { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, { &vop_print_desc, (vop_t *) portal_print }, { &vop_readdir_desc, (vop_t *) portal_readdir }, { &vop_reclaim_desc, (vop_t *) portal_reclaim }, - { &vop_seek_desc, (vop_t *) nullop }, { &vop_setattr_desc, (vop_t *) portal_setattr }, { &vop_unlock_desc, (vop_t *) vop_nounlock }, { NULL, NULL } 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 *)); @@ -184,24 +182,6 @@ procfs_close(ap) return (0); } -/* - * 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 @@ -281,43 +261,6 @@ procfs_reclaim(ap) return (procfs_freevp(ap->a_vp)); } -/* - * 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 @@ -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 } }; diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index 12a9f29f4eae..bdf769b957c3 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 @@ -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)); } } @@ -685,43 +681,6 @@ spec_print(ap) return (0); } -/* - * 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. */ diff --git a/sys/miscfs/union/union_vnops.c b/sys/miscfs/union/union_vnops.c index 9358834e30a0..e1c9a878a0cc 100644 --- a/sys/miscfs/union/union_vnops.c +++ b/sys/miscfs/union/union_vnops.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)union_vnops.c 8.32 (Berkeley) 6/23/95 - * $Id: union_vnops.c,v 1.43 1997/10/15 09:21:32 phk Exp $ + * $Id: union_vnops.c,v 1.44 1997/10/15 10:04:54 phk Exp $ */ #include @@ -94,7 +94,6 @@ static int union_remove __P((struct vop_remove_args *ap)); static int union_rename __P((struct vop_rename_args *ap)); static int union_revoke __P((struct vop_revoke_args *ap)); static int union_rmdir __P((struct vop_rmdir_args *ap)); -static int union_seek __P((struct vop_seek_args *ap)); static int union_poll __P((struct vop_poll_args *ap)); static int union_setattr __P((struct vop_setattr_args *ap)); static int union_strategy __P((struct vop_strategy_args *ap)); @@ -1034,21 +1033,6 @@ union_fsync(ap) return (error); } -static int -union_seek(ap) - struct vop_seek_args /* { - struct vnode *a_vp; - off_t a_oldoff; - off_t a_newoff; - struct ucred *a_cred; - } */ *ap; -{ - register struct vnode *ovp = OTHERVP(ap->a_vp); - - ap->a_vp = ovp; - return (VCALL(ovp, VOFFSET(vop_seek), ap)); -} - static int union_remove(ap) struct vop_remove_args /* { @@ -1786,7 +1770,6 @@ static struct vnodeopv_entry_desc union_vnodeop_entries[] = { { &vop_rename_desc, (vop_t *) union_rename }, { &vop_revoke_desc, (vop_t *) union_revoke }, { &vop_rmdir_desc, (vop_t *) union_rmdir }, - { &vop_seek_desc, (vop_t *) union_seek }, { &vop_setattr_desc, (vop_t *) union_setattr }, { &vop_strategy_desc, (vop_t *) union_strategy }, { &vop_symlink_desc, (vop_t *) union_symlink }, diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index 6871b107fba2..5adce6f7603a 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $Id: msdosfs_vnops.c,v 1.47 1997/10/15 10:05:03 phk Exp $ */ +/* $Id: msdosfs_vnops.c,v 1.48 1997/10/16 10:48:52 phk Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.20 1994/08/21 18:44:13 ws Exp $ */ /*- @@ -79,18 +79,13 @@ */ static int msdosfs_create __P((struct vop_create_args *)); static int msdosfs_mknod __P((struct vop_mknod_args *)); -static int msdosfs_open __P((struct vop_open_args *)); static int msdosfs_close __P((struct vop_close_args *)); static int msdosfs_access __P((struct vop_access_args *)); static int msdosfs_getattr __P((struct vop_getattr_args *)); static int msdosfs_setattr __P((struct vop_setattr_args *)); static int msdosfs_read __P((struct vop_read_args *)); static int msdosfs_write __P((struct vop_write_args *)); -static int msdosfs_ioctl __P((struct vop_ioctl_args *)); -static int msdosfs_poll __P((struct vop_poll_args *)); -static int msdosfs_mmap __P((struct vop_mmap_args *)); static int msdosfs_fsync __P((struct vop_fsync_args *)); -static int msdosfs_seek __P((struct vop_seek_args *)); static int msdosfs_remove __P((struct vop_remove_args *)); static int msdosfs_link __P((struct vop_link_args *)); static int msdosfs_rename __P((struct vop_rename_args *)); @@ -98,7 +93,6 @@ static int msdosfs_mkdir __P((struct vop_mkdir_args *)); static int msdosfs_rmdir __P((struct vop_rmdir_args *)); static int msdosfs_symlink __P((struct vop_symlink_args *)); static int msdosfs_readdir __P((struct vop_readdir_args *)); -static int msdosfs_readlink __P((struct vop_readlink_args *)); static int msdosfs_abortop __P((struct vop_abortop_args *)); static int msdosfs_lock __P((struct vop_lock_args *)); static int msdosfs_unlock __P((struct vop_unlock_args *)); @@ -106,9 +100,7 @@ static int msdosfs_bmap __P((struct vop_bmap_args *)); static int msdosfs_strategy __P((struct vop_strategy_args *)); static int msdosfs_print __P((struct vop_print_args *)); static int msdosfs_islocked __P((struct vop_islocked_args *)); -static int msdosfs_advlock __P((struct vop_advlock_args *)); static int msdosfs_pathconf __P((struct vop_pathconf_args *ap)); -static int msdosfs_reallocblks __P((struct vop_reallocblks_args *)); /* * Some general notes: @@ -214,18 +206,6 @@ msdosfs_mknod(ap) return error; } -static int -msdosfs_open(ap) - struct vop_open_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - return 0; -} - static int msdosfs_close(ap) struct vop_close_args /* { @@ -826,45 +806,6 @@ msdosfs_write(ap) return error; } -static int -msdosfs_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; -} - -static int -msdosfs_poll(ap) - struct vop_poll_args /* { - struct vnode *a_vp; - int a_events; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - /* DOS filesystems never block? */ - return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)); -} - -static int -msdosfs_mmap(ap) - struct vop_mmap_args /* { - struct vnode *a_vp; - int a_fflags; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - return EINVAL; -} - /* * Flush the blocks of a file to disk. * @@ -919,22 +860,6 @@ msdosfs_fsync(ap) return deupdat(VTODE(vp), &ts, wait); } -/* - * Now the whole work of extending a file is done in the write function. - * So nothing to do here. - */ -static int -msdosfs_seek(ap) - struct vop_seek_args /* { - struct vnode *a_vp; - off_t a_oldoff; - off_t a_newoff; - struct ucred *a_cred; - } */ *ap; -{ - return 0; -} - static int msdosfs_remove(ap) struct vop_remove_args /* { @@ -1772,20 +1697,6 @@ out: ; return error; } -/* - * DOS filesystems don't know what symlinks are. - */ -static int -msdosfs_readlink(ap) - struct vop_readlink_args /* { - struct vnode *a_vp; - struct uio *a_uio; - struct ucred *a_cred; - } */ *ap; -{ - return EINVAL; -} - static int msdosfs_abortop(ap) struct vop_abortop_args /* { @@ -1872,17 +1783,6 @@ msdosfs_bmap(ap) return pcbmap(dep, ap->a_bn, ap->a_bnp, 0); } -static int -msdosfs_reallocblks(ap) - struct vop_reallocblks_args /* { - struct vnode *a_vp; - struct cluster_save *a_buflist; - } */ *ap; -{ - /* Currently no support for clustering */ /* XXX */ - return ENOSPC; -} - static int msdosfs_strategy(ap) struct vop_strategy_args /* { @@ -1942,19 +1842,6 @@ msdosfs_print(ap) return 0; } -static int -msdosfs_advlock(ap) - struct vop_advlock_args /* { - struct vnode *a_vp; - caddr_t a_id; - int a_op; - struct flock *a_fl; - int a_flags; - } */ *ap; -{ - return EINVAL; /* we don't do locking yet */ -} - static int msdosfs_pathconf(ap) struct vop_pathconf_args /* { @@ -1990,7 +1877,6 @@ static struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = { { &vop_default_desc, (vop_t *) vn_default_error }, { &vop_abortop_desc, (vop_t *) msdosfs_abortop }, { &vop_access_desc, (vop_t *) msdosfs_access }, - { &vop_advlock_desc, (vop_t *) msdosfs_advlock }, { &vop_bmap_desc, (vop_t *) msdosfs_bmap }, { &vop_cachedlookup_desc, (vop_t *) msdosfs_lookup }, { &vop_close_desc, (vop_t *) msdosfs_close }, @@ -1998,27 +1884,20 @@ static struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = { { &vop_fsync_desc, (vop_t *) msdosfs_fsync }, { &vop_getattr_desc, (vop_t *) msdosfs_getattr }, { &vop_inactive_desc, (vop_t *) msdosfs_inactive }, - { &vop_ioctl_desc, (vop_t *) msdosfs_ioctl }, { &vop_islocked_desc, (vop_t *) msdosfs_islocked }, { &vop_link_desc, (vop_t *) msdosfs_link }, { &vop_lock_desc, (vop_t *) msdosfs_lock }, { &vop_lookup_desc, (vop_t *) vfs_cache_lookup }, { &vop_mkdir_desc, (vop_t *) msdosfs_mkdir }, { &vop_mknod_desc, (vop_t *) msdosfs_mknod }, - { &vop_mmap_desc, (vop_t *) msdosfs_mmap }, - { &vop_open_desc, (vop_t *) msdosfs_open }, { &vop_pathconf_desc, (vop_t *) msdosfs_pathconf }, - { &vop_poll_desc, (vop_t *) msdosfs_poll }, { &vop_print_desc, (vop_t *) msdosfs_print }, { &vop_read_desc, (vop_t *) msdosfs_read }, { &vop_readdir_desc, (vop_t *) msdosfs_readdir }, - { &vop_readlink_desc, (vop_t *) msdosfs_readlink }, - { &vop_reallocblks_desc, (vop_t *) msdosfs_reallocblks }, { &vop_reclaim_desc, (vop_t *) msdosfs_reclaim }, { &vop_remove_desc, (vop_t *) msdosfs_remove }, { &vop_rename_desc, (vop_t *) msdosfs_rename }, { &vop_rmdir_desc, (vop_t *) msdosfs_rmdir }, - { &vop_seek_desc, (vop_t *) msdosfs_seek }, { &vop_setattr_desc, (vop_t *) msdosfs_setattr }, { &vop_strategy_desc, (vop_t *) msdosfs_strategy }, { &vop_symlink_desc, (vop_t *) msdosfs_symlink }, diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 53e65eae617e..9019bf42b66b 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 - * $Id: nfs_vnops.c,v 1.66 1997/10/15 13:23:35 phk Exp $ + * $Id: nfs_vnops.c,v 1.67 1997/10/16 10:49:01 phk Exp $ */ @@ -98,7 +98,6 @@ static int nfsfifo_read __P((struct vop_read_args *)); static int nfsfifo_write __P((struct vop_write_args *)); static int nfsspec_close __P((struct vop_close_args *)); static int nfsfifo_close __P((struct vop_close_args *)); -static int nfs_ioctl __P((struct vop_ioctl_args *)); #define nfs_poll vop_nopoll static int nfs_flush __P((struct vnode *,struct ucred *,int,struct proc *,int)); static int nfs_setattrrpc __P((struct vnode *,struct vattr *,struct ucred *,struct proc *)); @@ -127,7 +126,6 @@ static int nfs_sillyrename __P((struct vnode *,struct vnode *,struct componentna static int nfsspec_access __P((struct vop_access_args *)); static int nfs_readlink __P((struct vop_readlink_args *)); static int nfs_print __P((struct vop_print_args *)); -static int nfs_pathconf __P((struct vop_pathconf_args *)); static int nfs_advlock __P((struct vop_advlock_args *)); static int nfs_bwrite __P((struct vop_bwrite_args *)); /* @@ -147,7 +145,6 @@ static struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = { { &vop_getattr_desc, (vop_t *) nfs_getattr }, { &vop_getpages_desc, (vop_t *) nfs_getpages }, { &vop_inactive_desc, (vop_t *) nfs_inactive }, - { &vop_ioctl_desc, (vop_t *) nfs_ioctl }, { &vop_islocked_desc, (vop_t *) vop_noislocked }, { &vop_lease_desc, (vop_t *) nullop }, { &vop_link_desc, (vop_t *) nfs_link }, @@ -157,7 +154,6 @@ static struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = { { &vop_mknod_desc, (vop_t *) nfs_mknod }, { &vop_mmap_desc, (vop_t *) nfs_mmap }, { &vop_open_desc, (vop_t *) nfs_open }, - { &vop_pathconf_desc, (vop_t *) nfs_pathconf }, { &vop_poll_desc, (vop_t *) nfs_poll }, { &vop_print_desc, (vop_t *) nfs_print }, { &vop_read_desc, (vop_t *) nfs_read }, @@ -167,7 +163,6 @@ static struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = { { &vop_remove_desc, (vop_t *) nfs_remove }, { &vop_rename_desc, (vop_t *) nfs_rename }, { &vop_rmdir_desc, (vop_t *) nfs_rmdir }, - { &vop_seek_desc, (vop_t *) nullop }, { &vop_setattr_desc, (vop_t *) nfs_setattr }, { &vop_strategy_desc, (vop_t *) nfs_strategy }, { &vop_symlink_desc, (vop_t *) nfs_symlink }, @@ -2931,25 +2926,6 @@ nfs_flush(vp, cred, waitfor, p, commit) return (error); } -/* - * Return POSIX pathconf information applicable to nfs. - * - * The NFS V2 protocol doesn't support this, so just return EINVAL - * for V2. - */ -/* ARGSUSED */ -static int -nfs_pathconf(ap) - struct vop_pathconf_args /* { - struct vnode *a_vp; - int a_name; - int *a_retval; - } */ *ap; -{ - - return (EINVAL); -} - /* * NFS advisory byte-level locks. * Currently unsupported. @@ -3312,15 +3288,3 @@ nfsfifo_close(ap) } return (VOCALL(fifo_vnodeop_p, VOFFSET(vop_close), ap)); } - -static int -nfs_ioctl(ap) - struct vop_ioctl_args *ap; -{ - - /* - * XXX we were once bogusly enoictl() which returned this (ENOTTY). - * Probably we should return ENODEV. - */ - return (ENOTTY); -} diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index 53e65eae617e..9019bf42b66b 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 - * $Id: nfs_vnops.c,v 1.66 1997/10/15 13:23:35 phk Exp $ + * $Id: nfs_vnops.c,v 1.67 1997/10/16 10:49:01 phk Exp $ */ @@ -98,7 +98,6 @@ static int nfsfifo_read __P((struct vop_read_args *)); static int nfsfifo_write __P((struct vop_write_args *)); static int nfsspec_close __P((struct vop_close_args *)); static int nfsfifo_close __P((struct vop_close_args *)); -static int nfs_ioctl __P((struct vop_ioctl_args *)); #define nfs_poll vop_nopoll static int nfs_flush __P((struct vnode *,struct ucred *,int,struct proc *,int)); static int nfs_setattrrpc __P((struct vnode *,struct vattr *,struct ucred *,struct proc *)); @@ -127,7 +126,6 @@ static int nfs_sillyrename __P((struct vnode *,struct vnode *,struct componentna static int nfsspec_access __P((struct vop_access_args *)); static int nfs_readlink __P((struct vop_readlink_args *)); static int nfs_print __P((struct vop_print_args *)); -static int nfs_pathconf __P((struct vop_pathconf_args *)); static int nfs_advlock __P((struct vop_advlock_args *)); static int nfs_bwrite __P((struct vop_bwrite_args *)); /* @@ -147,7 +145,6 @@ static struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = { { &vop_getattr_desc, (vop_t *) nfs_getattr }, { &vop_getpages_desc, (vop_t *) nfs_getpages }, { &vop_inactive_desc, (vop_t *) nfs_inactive }, - { &vop_ioctl_desc, (vop_t *) nfs_ioctl }, { &vop_islocked_desc, (vop_t *) vop_noislocked }, { &vop_lease_desc, (vop_t *) nullop }, { &vop_link_desc, (vop_t *) nfs_link }, @@ -157,7 +154,6 @@ static struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = { { &vop_mknod_desc, (vop_t *) nfs_mknod }, { &vop_mmap_desc, (vop_t *) nfs_mmap }, { &vop_open_desc, (vop_t *) nfs_open }, - { &vop_pathconf_desc, (vop_t *) nfs_pathconf }, { &vop_poll_desc, (vop_t *) nfs_poll }, { &vop_print_desc, (vop_t *) nfs_print }, { &vop_read_desc, (vop_t *) nfs_read }, @@ -167,7 +163,6 @@ static struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = { { &vop_remove_desc, (vop_t *) nfs_remove }, { &vop_rename_desc, (vop_t *) nfs_rename }, { &vop_rmdir_desc, (vop_t *) nfs_rmdir }, - { &vop_seek_desc, (vop_t *) nullop }, { &vop_setattr_desc, (vop_t *) nfs_setattr }, { &vop_strategy_desc, (vop_t *) nfs_strategy }, { &vop_symlink_desc, (vop_t *) nfs_symlink }, @@ -2931,25 +2926,6 @@ nfs_flush(vp, cred, waitfor, p, commit) return (error); } -/* - * Return POSIX pathconf information applicable to nfs. - * - * The NFS V2 protocol doesn't support this, so just return EINVAL - * for V2. - */ -/* ARGSUSED */ -static int -nfs_pathconf(ap) - struct vop_pathconf_args /* { - struct vnode *a_vp; - int a_name; - int *a_retval; - } */ *ap; -{ - - return (EINVAL); -} - /* * NFS advisory byte-level locks. * Currently unsupported. @@ -3312,15 +3288,3 @@ nfsfifo_close(ap) } return (VOCALL(fifo_vnodeop_p, VOFFSET(vop_close), ap)); } - -static int -nfs_ioctl(ap) - struct vop_ioctl_args *ap; -{ - - /* - * XXX we were once bogusly enoictl() which returned this (ENOTTY). - * Probably we should return ENODEV. - */ - return (ENOTTY); -} diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 009d827b3e29..e6a5e2962e3e 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)vnode.h 8.7 (Berkeley) 2/4/94 - * $Id: vnode.h,v 1.50 1997/10/12 20:26:07 phk Exp $ + * $Id: vnode.h,v 1.51 1997/10/16 10:49:13 phk Exp $ */ #ifndef _SYS_VNODE_H_ @@ -381,13 +381,6 @@ struct vop_generic_args { /* other random data follows, presumably */ }; -/* - * A default routine for vnops we shouldn't hit - */ -int vn_defaultop __P((struct vop_generic_args *ap)); - -/* XXX: compat until fixed all places*/ -#define vn_default_error vn_defaultop #ifdef DEBUG_VFS_LOCKS /* @@ -513,8 +506,19 @@ int vop_noislocked __P((struct vop_islocked_args *)); int vop_nolock __P((struct vop_lock_args *)); int vop_nopoll __P((struct vop_poll_args *)); int vop_nounlock __P((struct vop_unlock_args *)); +int vop_stdpathconf __P((struct vop_pathconf_args *)); int vop_revoke __P((struct vop_revoke_args *)); int vop_sharedlock __P((struct vop_lock_args *)); +int vop_eopnotsupp __P((struct vop_generic_args *ap)); +int vop_ebadf __P((struct vop_generic_args *ap)); +int vop_einval __P((struct vop_generic_args *ap)); +int vop_enotty __P((struct vop_generic_args *ap)); +int vop_defaultop __P((struct vop_generic_args *ap)); +int vop_null __P((struct vop_generic_args *ap)); + +/* XXX: compat until fixed all places*/ +#define vn_default_error vop_defaultop + struct vnode * checkalias __P((struct vnode *vp, dev_t nvp_rdev, struct mount *mp)); void vput __P((struct vnode *vp)); diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 85ef1b6c54ef..7f8d84d86bcb 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_alloc.c 8.18 (Berkeley) 5/26/95 - * $Id: ffs_alloc.c,v 1.39 1997/10/14 18:46:41 phk Exp $ + * $Id: ffs_alloc.c,v 1.40 1997/10/16 10:49:19 phk Exp $ */ #include "opt_quota.h" @@ -486,7 +486,7 @@ ffs_reallocblks(ap) ip->i_flag |= IN_CHANGE | IN_UPDATE; if (!doasyncfree) { gettime(&tv); - VOP_UPDATE(vp, &tv, &tv, 1); + UFS_UPDATE(vp, &tv, &tv, 1); } } if (ssize < len) diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h index 4aa6118e0710..38701c5d4ac1 100644 --- a/sys/ufs/ffs/ffs_extern.h +++ b/sys/ufs/ffs/ffs_extern.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_extern.h 8.6 (Berkeley) 3/30/95 - * $Id: ffs_extern.h,v 1.18 1997/10/10 18:16:58 phk Exp $ + * $Id: ffs_extern.h,v 1.19 1997/10/16 10:49:22 phk Exp $ */ #ifndef _UFS_FFS_EXTERN_H @@ -86,7 +86,7 @@ int ffs_statfs __P((struct mount *, struct statfs *, struct proc *)); int ffs_sync __P((struct mount *, int, struct ucred *, struct proc *)); int ffs_truncate __P((struct vnode *, off_t, int, struct ucred *, struct proc *)); int ffs_unmount __P((struct mount *, int, struct proc *)); -int ffs_update __P((struct vop_update_args *)); +int ffs_update __P((struct vnode *, struct timeval *, struct timeval *, int)); int ffs_valloc __P((struct vnode *, int, struct ucred *, struct vnode **)); int ffs_vfree __P((struct vnode *, ino_t, int)); diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index 78cf65c22abb..92bb2a762385 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_inode.c 8.13 (Berkeley) 4/21/95 - * $Id: ffs_inode.c,v 1.27 1997/09/02 20:06:44 bde Exp $ + * $Id: ffs_inode.c,v 1.28 1997/10/16 10:49:28 phk Exp $ */ #include "opt_quota.h" @@ -50,6 +50,7 @@ #include #include +#include #include #include @@ -68,13 +69,11 @@ static int ffs_indirtrunc __P((struct inode *, ufs_daddr_t, ufs_daddr_t, * write of the inode to complete. */ int -ffs_update(ap) - struct vop_update_args /* { - struct vnode *a_vp; - struct timeval *a_access; - struct timeval *a_modify; - int a_waitfor; - } */ *ap; +ffs_update(vp, access, modify, waitfor) + struct vnode *vp; + struct timeval *access; + struct timeval *modify; + int waitfor; { register struct fs *fs; struct buf *bp; @@ -82,8 +81,8 @@ ffs_update(ap) int error; time_t tv_sec; - ip = VTOI(ap->a_vp); - if (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY) { + ip = VTOI(vp); + if (vp->v_mount->mnt_flag & MNT_RDONLY) { ip->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE); return (0); @@ -106,10 +105,10 @@ ffs_update(ap) tv_sec = time.tv_sec; if (ip->i_flag & IN_ACCESS) ip->i_atime = - (ap->a_access == &time ? tv_sec : ap->a_access->tv_sec); + (access == &time ? tv_sec : access->tv_sec); if (ip->i_flag & IN_UPDATE) { ip->i_mtime = - (ap->a_modify == &time ? tv_sec : ap->a_modify->tv_sec); + (modify == &time ? tv_sec : modify->tv_sec); ip->i_modrev++; } if (ip->i_flag & IN_CHANGE) @@ -132,7 +131,7 @@ ffs_update(ap) } *((struct dinode *)bp->b_data + ino_to_fsbo(fs, ip->i_number)) = ip->i_din; - if (ap->a_waitfor && (ap->a_vp->v_mount->mnt_flag & MNT_ASYNC) == 0) + if (waitfor && (vp->v_mount->mnt_flag & MNT_ASYNC) == 0) return (bwrite(bp)); else { bp->b_flags |= B_CLUSTEROK; @@ -186,11 +185,11 @@ ffs_truncate(vp, length, flags, cred, p) bzero((char *)&oip->i_shortlink, (u_int)oip->i_size); oip->i_size = 0; oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (VOP_UPDATE(ovp, &tv, &tv, 1)); + return (UFS_UPDATE(ovp, &tv, &tv, 1)); } if (oip->i_size == length) { oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (VOP_UPDATE(ovp, &tv, &tv, 0)); + return (UFS_UPDATE(ovp, &tv, &tv, 0)); } #ifdef QUOTA error = getinoquota(oip); @@ -222,7 +221,7 @@ ffs_truncate(vp, length, flags, cred, p) else bawrite(bp); oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (VOP_UPDATE(ovp, &tv, &tv, 1)); + return (UFS_UPDATE(ovp, &tv, &tv, 1)); } /* * Shorten the size of the file. If the file is not being @@ -280,7 +279,7 @@ ffs_truncate(vp, length, flags, cred, p) for (i = NDADDR - 1; i > lastblock; i--) oip->i_db[i] = 0; oip->i_flag |= IN_CHANGE | IN_UPDATE; - error = VOP_UPDATE(ovp, &tv, &tv, ((length > 0) ? 0 : 1)); + error = UFS_UPDATE(ovp, &tv, &tv, ((length > 0) ? 0 : 1)); if (error) allerror = error; /* diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index c053477c5929..45d8a0f7ad2d 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95 - * $Id: ffs_vfsops.c,v 1.59 1997/10/12 20:26:12 phk Exp $ + * $Id: ffs_vfsops.c,v 1.60 1997/10/16 10:49:33 phk Exp $ */ #include "opt_quota.h" @@ -557,6 +557,7 @@ ffs_mountfs(devvp, mp, p, malloctype) M_WAITOK); ump->um_blkatoff = ffs_blkatoff; ump->um_truncate = ffs_truncate; + ump->um_update = ffs_update; ump->um_valloc = ffs_valloc; ump->um_vfree = ffs_vfree; bcopy(bp->b_data, ump->um_fs, (u_int)fs->fs_sbsize); @@ -877,8 +878,8 @@ ffs_sync(mp, waitfor, cred, p) simple_unlock(&mntvnode_slock); simple_unlock(&vp->v_interlock); gettime(&tv); - /* VOP_UPDATE(vp, &tv, &tv, waitfor == MNT_WAIT); */ - VOP_UPDATE(vp, &tv, &tv, 0); + /* UFS_UPDATE(vp, &tv, &tv, waitfor == MNT_WAIT); */ + UFS_UPDATE(vp, &tv, &tv, 0); simple_lock(&mntvnode_slock); } } diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 254d5e56ae93..7400ed5c7d80 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ffs_vnops.c 8.15 (Berkeley) 5/14/95 - * $Id: ffs_vnops.c,v 1.34 1997/10/15 13:23:47 phk Exp $ + * $Id: ffs_vnops.c,v 1.35 1997/10/16 10:49:35 phk Exp $ */ #include @@ -77,7 +77,6 @@ static struct vnodeopv_entry_desc ffs_vnodeop_entries[] = { { &vop_getpages_desc, (vop_t *) ffs_getpages }, { &vop_read_desc, (vop_t *) ffs_read }, { &vop_reallocblks_desc, (vop_t *) ffs_reallocblks }, - { &vop_update_desc, (vop_t *) ffs_update }, { &vop_write_desc, (vop_t *) ffs_write }, { NULL, NULL } }; @@ -88,7 +87,6 @@ vop_t **ffs_specop_p; static struct vnodeopv_entry_desc ffs_specop_entries[] = { { &vop_default_desc, (vop_t *) ufs_vnoperatespec }, { &vop_fsync_desc, (vop_t *) ffs_fsync }, - { &vop_update_desc, (vop_t *) ffs_update }, { NULL, NULL } }; static struct vnodeopv_desc ffs_specop_opv_desc = @@ -98,7 +96,6 @@ vop_t **ffs_fifoop_p; static struct vnodeopv_entry_desc ffs_fifoop_entries[] = { { &vop_default_desc, (vop_t *) ufs_vnoperatefifo }, { &vop_fsync_desc, (vop_t *) ffs_fsync }, - { &vop_update_desc, (vop_t *) ffs_update }, { NULL, NULL } }; static struct vnodeopv_desc ffs_fifoop_opv_desc = @@ -187,6 +184,6 @@ ffs_fsync(ap) } gettime(&tv); - return (VOP_UPDATE(ap->a_vp, &tv, &tv, ap->a_waitfor == MNT_WAIT)); + return (UFS_UPDATE(ap->a_vp, &tv, &tv, ap->a_waitfor == MNT_WAIT)); } diff --git a/sys/ufs/lfs/lfs_extern.h b/sys/ufs/lfs/lfs_extern.h index 030feddbaf7d..d930f4db979e 100644 --- a/sys/ufs/lfs/lfs_extern.h +++ b/sys/ufs/lfs/lfs_extern.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)lfs_extern.h 8.6 (Berkeley) 5/8/95 - * $Id: lfs_extern.h,v 1.17 1997/10/12 20:26:15 phk Exp $ + * $Id: lfs_extern.h,v 1.18 1997/10/16 10:49:44 phk Exp $ */ #ifndef _UFS_LFS_LFS_EXTERN_H_ @@ -68,7 +68,7 @@ int lfs_segwrite __P((struct mount *, int)); #define lfs_sysctl ((int (*) __P((int *, u_int, void *, size_t *, void *, \ size_t, struct proc *)))eopnotsupp) int lfs_truncate __P((struct vnode *, off_t, int, struct ucred *, struct proc *)); -int lfs_update __P((struct vop_update_args *)); +int lfs_update __P((struct vnode *, struct timeval *, struct timeval *, int)); void lfs_updatemeta __P((struct segment *)); int lfs_valloc __P((struct vnode *, int, struct ucred *, struct vnode **)); int lfs_vcreate __P((struct mount *, ino_t, struct vnode **)); diff --git a/sys/ufs/lfs/lfs_inode.c b/sys/ufs/lfs/lfs_inode.c index 6b0315132dc6..39edcae76253 100644 --- a/sys/ufs/lfs/lfs_inode.c +++ b/sys/ufs/lfs/lfs_inode.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)lfs_inode.c 8.9 (Berkeley) 5/8/95 - * $Id: lfs_inode.c,v 1.18 1997/09/02 20:06:48 bde Exp $ + * $Id: lfs_inode.c,v 1.19 1997/10/16 10:49:47 phk Exp $ */ #include "opt_quota.h" @@ -73,15 +73,12 @@ lfs_ifind(fs, ino, dip) } int -lfs_update(ap) - struct vop_update_args /* { - struct vnode *a_vp; - struct timeval *a_access; - struct timeval *a_modify; - int a_waitfor; - } */ *ap; +lfs_update(vp, access, modify, waitfor) + struct vnode *vp; + struct timeval *access; + struct timeval *modify; + int waitfor; { - struct vnode *vp = ap->a_vp; struct inode *ip; int error; @@ -104,9 +101,9 @@ lfs_update(ap) return(0); if (ip->i_flag & IN_ACCESS) - ip->i_atime = ap->a_access->tv_sec; + ip->i_atime = access->tv_sec; if (ip->i_flag & IN_UPDATE) { - ip->i_mtime = ap->a_modify->tv_sec; + ip->i_mtime = modify->tv_sec; (ip)->i_modrev++; } if (ip->i_flag & IN_CHANGE) @@ -118,8 +115,8 @@ lfs_update(ap) ip->i_flag |= IN_MODIFIED; /* If sync, push back the vnode and any dirty blocks it may have. */ - error = (ap->a_waitfor & LFS_SYNC ? lfs_vflush(vp) : 0); - if(ap->a_waitfor & LFS_SYNC && vp->v_dirtyblkhd.lh_first != NULL) + error = (waitfor & LFS_SYNC ? lfs_vflush(vp) : 0); + if(waitfor & LFS_SYNC && vp->v_dirtyblkhd.lh_first != NULL) panic("lfs_update: dirty bufs"); return( error ); @@ -186,7 +183,7 @@ lfs_truncate(vp, length, flags, cred, p) bzero((char *)&ip->i_shortlink, (u_int)ip->i_size); ip->i_size = 0; ip->i_flag |= IN_CHANGE | IN_UPDATE; - return (VOP_UPDATE(vp, &tv, &tv, 0)); + return (UFS_UPDATE(vp, &tv, &tv, 0)); } vnode_pager_setsize(vp, (u_long)length); @@ -195,7 +192,7 @@ lfs_truncate(vp, length, flags, cred, p) /* If length is larger than the file, just update the times. */ if (ip->i_size <= length) { ip->i_flag |= IN_CHANGE | IN_UPDATE; - return (VOP_UPDATE(vp, &tv, &tv, 0)); + return (UFS_UPDATE(vp, &tv, &tv, 0)); } /* @@ -376,6 +373,6 @@ lfs_truncate(vp, length, flags, cred, p) fs->lfs_avail += fragstodb(fs, a_released); e1 = vinvalbuf(vp, (length > 0) ? V_SAVE : 0, cred, p, 0, 0); - e2 = VOP_UPDATE(vp, &tv, &tv, 0); + e2 = UFS_UPDATE(vp, &tv, &tv, 0); return (e1 ? e1 : e2 ? e2 : 0); } diff --git a/sys/ufs/lfs/lfs_vfsops.c b/sys/ufs/lfs/lfs_vfsops.c index aa54c28b0246..c543639ab86d 100644 --- a/sys/ufs/lfs/lfs_vfsops.c +++ b/sys/ufs/lfs/lfs_vfsops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)lfs_vfsops.c 8.20 (Berkeley) 6/10/95 - * $Id: lfs_vfsops.c,v 1.24 1997/10/12 20:26:17 phk Exp $ + * $Id: lfs_vfsops.c,v 1.25 1997/10/16 08:16:34 julian Exp $ */ #include "opt_quota.h" @@ -385,6 +385,11 @@ lfs_mountfs(devvp, mp, p) ump = (struct ufsmount *)malloc(sizeof *ump, M_UFSMNT, M_WAITOK); bzero(ump, sizeof *ump); ump->um_malloctype = M_LFSNODE; + ump->um_blkatoff = lfs_blkatoff; + ump->um_truncate = lfs_truncate; + ump->um_update = lfs_update; + ump->um_valloc = lfs_valloc; + ump->um_vfree = lfs_vfree; fs = ump->um_lfs = malloc(sizeof(struct lfs), M_UFSMNT, M_WAITOK); bcopy(bp->b_data, fs, sizeof(struct lfs)); if (sizeof(struct lfs) < LFS_SBPAD) /* XXX why? */ diff --git a/sys/ufs/lfs/lfs_vnops.c b/sys/ufs/lfs/lfs_vnops.c index a440b2bd9c79..fd383a7aca6a 100644 --- a/sys/ufs/lfs/lfs_vnops.c +++ b/sys/ufs/lfs/lfs_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)lfs_vnops.c 8.13 (Berkeley) 6/10/95 - * $Id: lfs_vnops.c,v 1.27 1997/10/15 13:23:52 phk Exp $ + * $Id: lfs_vnops.c,v 1.28 1997/10/16 10:49:53 phk Exp $ */ #include @@ -79,7 +79,6 @@ static struct vnodeopv_entry_desc lfs_vnodeop_entries[] = { { &vop_fsync_desc, (vop_t *) lfs_fsync }, { &vop_getattr_desc, (vop_t *) lfs_getattr }, { &vop_read_desc, (vop_t *) lfs_read }, - { &vop_update_desc, (vop_t *) lfs_update }, { &vop_write_desc, (vop_t *) lfs_write }, { &vop_lookup_desc, (vop_t *) ufs_lookup }, { NULL, NULL } @@ -92,7 +91,6 @@ static struct vnodeopv_entry_desc lfs_specop_entries[] = { { &vop_default_desc, (vop_t *) ufs_vnoperatespec }, { &vop_bwrite_desc, (vop_t *) lfs_bwrite }, { &vop_getattr_desc, (vop_t *) lfs_getattr }, - { &vop_update_desc, (vop_t *) lfs_update }, { NULL, NULL } }; static struct vnodeopv_desc lfs_specop_opv_desc = @@ -103,7 +101,6 @@ static struct vnodeopv_entry_desc lfs_fifoop_entries[] = { { &vop_default_desc, (vop_t *) ufs_vnoperatefifo }, { &vop_bwrite_desc, (vop_t *) lfs_bwrite }, { &vop_getattr_desc, (vop_t *) lfs_getattr }, - { &vop_update_desc, (vop_t *) lfs_update }, { NULL, NULL } }; static struct vnodeopv_desc lfs_fifoop_opv_desc = @@ -134,7 +131,7 @@ lfs_fsync(ap) int error; gettime(&tv); - error = (VOP_UPDATE(ap->a_vp, &tv, &tv, + error = (UFS_UPDATE(ap->a_vp, &tv, &tv, ap->a_waitfor == MNT_WAIT ? LFS_SYNC : 0)); if(ap->a_waitfor == MNT_WAIT && ap->a_vp->v_dirtyblkhd.lh_first != NULL) panic("lfs_fsync: dirty bufs"); diff --git a/sys/ufs/mfs/mfs_vnops.c b/sys/ufs/mfs/mfs_vnops.c index 0c552bd437d6..1e099583fcbe 100644 --- a/sys/ufs/mfs/mfs_vnops.c +++ b/sys/ufs/mfs/mfs_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)mfs_vnops.c 8.11 (Berkeley) 5/22/95 - * $Id: mfs_vnops.c,v 1.24 1997/10/15 13:23:57 phk Exp $ + * $Id: mfs_vnops.c,v 1.25 1997/10/16 10:50:03 phk Exp $ */ #include @@ -56,7 +56,6 @@ static int mfs_badop __P((void)); static int mfs_bmap __P((struct vop_bmap_args *)); static int mfs_close __P((struct vop_close_args *)); static int mfs_fsync __P((struct vop_fsync_args *)); -static int mfs_ioctl __P((struct vop_ioctl_args *)); static int mfs_inactive __P((struct vop_inactive_args *)); /* XXX */ static int mfs_open __P((struct vop_open_args *)); static int mfs_print __P((struct vop_print_args *)); /* XXX */ @@ -71,7 +70,6 @@ static struct vnodeopv_entry_desc mfs_vnodeop_entries[] = { { &vop_close_desc, (vop_t *) mfs_close }, { &vop_fsync_desc, (vop_t *) mfs_fsync }, { &vop_inactive_desc, (vop_t *) mfs_inactive }, - { &vop_ioctl_desc, (vop_t *) mfs_ioctl }, { &vop_islocked_desc, (vop_t *) vop_noislocked }, { &vop_lock_desc, (vop_t *) vop_nolock }, { &vop_open_desc, (vop_t *) mfs_open }, @@ -119,25 +117,6 @@ mfs_fsync(ap) return (VOCALL(spec_vnodeop_p, VOFFSET(vop_fsync), ap)); } -/* - * Ioctl operation. - */ -/* ARGSUSED */ -static int -mfs_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); -} - /* * Pass I/O requests to the memory filesystem process. */ diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c index e635f29d3d6e..822d9df834d4 100644 --- a/sys/ufs/ufs/ufs_inode.c +++ b/sys/ufs/ufs/ufs_inode.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_inode.c 8.9 (Berkeley) 5/14/95 - * $Id: ufs_inode.c,v 1.18 1997/10/14 18:46:48 phk Exp $ + * $Id: ufs_inode.c,v 1.19 1997/10/16 10:50:14 phk Exp $ */ #include "opt_quota.h" @@ -92,7 +92,7 @@ ufs_inactive(ap) } if (ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) { gettime(&tv); - VOP_UPDATE(vp, &tv, &tv, 0); + UFS_UPDATE(vp, &tv, &tv, 0); } out: VOP_UNLOCK(vp, 0, p); diff --git a/sys/ufs/ufs/ufs_readwrite.c b/sys/ufs/ufs/ufs_readwrite.c index afbe95f56df5..f9f6d06c3be9 100644 --- a/sys/ufs/ufs/ufs_readwrite.c +++ b/sys/ufs/ufs/ufs_readwrite.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufs_readwrite.c 8.11 (Berkeley) 5/8/95 - * $Id: ufs_readwrite.c,v 1.31 1997/09/27 13:40:20 kato Exp $ + * $Id: ufs_readwrite.c,v 1.32 1997/10/16 10:50:21 phk Exp $ */ #ifdef LFS_READWRITE @@ -312,7 +312,7 @@ WRITE(ap) } } else if (resid > uio->uio_resid && (ioflag & IO_SYNC)) { gettime(&tv); - error = VOP_UPDATE(vp, &tv, &tv, 1); + error = UFS_UPDATE(vp, &tv, &tv, 1); } return (error); } diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index d653601eb78a..0a80e7fce213 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)ufs_vnops.c 8.27 (Berkeley) 5/27/95 - * $Id: ufs_vnops.c,v 1.60 1997/10/16 10:50:24 phk Exp $ + * $Id: ufs_vnops.c,v 1.61 1997/10/16 11:59:09 phk Exp $ */ #include "opt_quota.h" @@ -73,7 +73,6 @@ static int ufs_chown __P((struct vnode *, uid_t, gid_t, struct ucred *, struct p static int ufs_close __P((struct vop_close_args *)); static int ufs_create __P((struct vop_create_args *)); static int ufs_getattr __P((struct vop_getattr_args *)); -static int ufs_ioctl __P((struct vop_ioctl_args *)); static int ufs_islocked __P((struct vop_islocked_args *)); static int ufs_link __P((struct vop_link_args *)); static int ufs_lock __P((struct vop_lock_args *)); @@ -83,14 +82,12 @@ static int ufs_mkdir __P((struct vop_mkdir_args *)); static int ufs_mknod __P((struct vop_mknod_args *)); static int ufs_mmap __P((struct vop_mmap_args *)); static int ufs_open __P((struct vop_open_args *)); -static int ufs_pathconf __P((struct vop_pathconf_args *)); static int ufs_print __P((struct vop_print_args *)); static int ufs_readdir __P((struct vop_readdir_args *)); static int ufs_readlink __P((struct vop_readlink_args *)); static int ufs_remove __P((struct vop_remove_args *)); static int ufs_rename __P((struct vop_rename_args *)); static int ufs_rmdir __P((struct vop_rmdir_args *)); -static int ufs_seek __P((struct vop_seek_args *)); static int ufs_setattr __P((struct vop_setattr_args *)); static int ufs_strategy __P((struct vop_strategy_args *)); static int ufs_symlink __P((struct vop_symlink_args *)); @@ -468,7 +465,7 @@ ufs_setattr(ap) atimeval.tv_usec = vap->va_atime.tv_nsec / 1000; mtimeval.tv_sec = vap->va_mtime.tv_sec; mtimeval.tv_usec = vap->va_mtime.tv_nsec / 1000; - error = VOP_UPDATE(vp, &atimeval, &mtimeval, 1); + error = UFS_UPDATE(vp, &atimeval, &mtimeval, 1); if (error) return (error); } @@ -616,22 +613,6 @@ ufs_chown(vp, uid, gid, cred, p) return (0); } -/* ARGSUSED */ -int -ufs_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); -} - /* * Mmap a file * @@ -651,25 +632,6 @@ ufs_mmap(ap) return (EINVAL); } -/* - * Seek on a file - * - * Nothing to do, so just return. - */ -/* ARGSUSED */ -int -ufs_seek(ap) - struct vop_seek_args /* { - struct vnode *a_vp; - off_t a_oldoff; - off_t a_newoff; - struct ucred *a_cred; - } */ *ap; -{ - - return (0); -} - int ufs_remove(ap) struct vop_remove_args /* { @@ -757,7 +719,7 @@ ufs_link(ap) ip->i_nlink++; ip->i_flag |= IN_CHANGE; gettime(&tv); - error = VOP_UPDATE(vp, &tv, &tv, 1); + error = UFS_UPDATE(vp, &tv, &tv, 1); if (!error) { #ifdef EXT2FS if (IS_EXT2_VNODE(tdvp)) { @@ -1016,7 +978,7 @@ ufs_rename(ap) ip->i_nlink++; ip->i_flag |= IN_CHANGE; gettime(&tv); - if (error = VOP_UPDATE(fvp, &tv, &tv, 1)) { + if (error = UFS_UPDATE(fvp, &tv, &tv, 1)) { VOP_UNLOCK(fvp, 0, p); goto bad; } @@ -1085,7 +1047,7 @@ ufs_rename(ap) } dp->i_nlink++; dp->i_flag |= IN_CHANGE; - error = VOP_UPDATE(tdvp, &tv, &tv, 1); + error = UFS_UPDATE(tdvp, &tv, &tv, 1); if (error) goto bad; } @@ -1102,7 +1064,7 @@ ufs_rename(ap) if (doingdirectory && newparent) { dp->i_nlink--; dp->i_flag |= IN_CHANGE; - (void)VOP_UPDATE(tdvp, &tv, &tv, 1); + (void)UFS_UPDATE(tdvp, &tv, &tv, 1); } goto bad; } @@ -1390,7 +1352,7 @@ ufs_mkdir(ap) if (cnp->cn_flags & ISWHITEOUT) ip->i_flags |= UF_OPAQUE; gettime(&tv); - error = VOP_UPDATE(tvp, &tv, &tv, 1); + error = UFS_UPDATE(tvp, &tv, &tv, 1); /* * Bump link count in parent directory @@ -1400,7 +1362,7 @@ ufs_mkdir(ap) */ dp->i_nlink++; dp->i_flag |= IN_CHANGE; - error = VOP_UPDATE(dvp, &tv, &tv, 1); + error = UFS_UPDATE(dvp, &tv, &tv, 1); if (error) goto bad; @@ -1989,43 +1951,6 @@ ufsfifo_close(ap) return (VOCALL (fifo_vnodeop_p, VOFFSET(vop_close), ap)); } -/* - * Return POSIX pathconf information applicable to ufs filesystems. - */ -int -ufs_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_NAME_MAX: - *ap->a_retval = NAME_MAX; - return (0); - case _PC_PATH_MAX: - *ap->a_retval = PATH_MAX; - 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_NO_TRUNC: - *ap->a_retval = 1; - return (0); - default: - return (EINVAL); - } - /* NOTREACHED */ -} - /* * Advisory record locking support */ @@ -2159,7 +2084,7 @@ ufs_makeinode(mode, dvp, vpp, cnp) * Make sure inode goes to disk before directory entry. */ gettime(&tv); - error = VOP_UPDATE(tvp, &tv, &tv, 1); + error = UFS_UPDATE(tvp, &tv, &tv, 1); if (error) goto bad; #ifdef EXT2FS @@ -2211,7 +2136,6 @@ static struct vnodeopv_entry_desc ufs_vnodeop_entries[] = { { &vop_getpages_desc, (vop_t *) ufs_missingop }, { &vop_read_desc, (vop_t *) ufs_missingop }, { &vop_reallocblks_desc, (vop_t *) ufs_missingop }, - { &vop_update_desc, (vop_t *) ufs_missingop }, { &vop_write_desc, (vop_t *) ufs_missingop }, { &vop_abortop_desc, (vop_t *) ufs_abortop }, { &vop_access_desc, (vop_t *) ufs_access }, @@ -2222,7 +2146,6 @@ static struct vnodeopv_entry_desc ufs_vnodeop_entries[] = { { &vop_create_desc, (vop_t *) ufs_create }, { &vop_getattr_desc, (vop_t *) ufs_getattr }, { &vop_inactive_desc, (vop_t *) ufs_inactive }, - { &vop_ioctl_desc, (vop_t *) ufs_ioctl }, { &vop_islocked_desc, (vop_t *) ufs_islocked }, { &vop_link_desc, (vop_t *) ufs_link }, { &vop_lock_desc, (vop_t *) ufs_lock }, @@ -2231,7 +2154,7 @@ static struct vnodeopv_entry_desc ufs_vnodeop_entries[] = { { &vop_mknod_desc, (vop_t *) ufs_mknod }, { &vop_mmap_desc, (vop_t *) ufs_mmap }, { &vop_open_desc, (vop_t *) ufs_open }, - { &vop_pathconf_desc, (vop_t *) ufs_pathconf }, + { &vop_pathconf_desc, (vop_t *) vop_stdpathconf }, { &vop_print_desc, (vop_t *) ufs_print }, { &vop_readdir_desc, (vop_t *) ufs_readdir }, { &vop_readlink_desc, (vop_t *) ufs_readlink }, @@ -2239,7 +2162,6 @@ static struct vnodeopv_entry_desc ufs_vnodeop_entries[] = { { &vop_remove_desc, (vop_t *) ufs_remove }, { &vop_rename_desc, (vop_t *) ufs_rename }, { &vop_rmdir_desc, (vop_t *) ufs_rmdir }, - { &vop_seek_desc, (vop_t *) ufs_seek }, { &vop_setattr_desc, (vop_t *) ufs_setattr }, { &vop_strategy_desc, (vop_t *) ufs_strategy }, { &vop_symlink_desc, (vop_t *) ufs_symlink }, @@ -2254,7 +2176,6 @@ vop_t **ufs_specop_p; static struct vnodeopv_entry_desc ufs_specop_entries[] = { { &vop_default_desc, (vop_t *) spec_vnoperate }, { &vop_fsync_desc, (vop_t *) ufs_missingop }, - { &vop_update_desc, (vop_t *) ufs_missingop }, { &vop_access_desc, (vop_t *) ufs_access }, { &vop_close_desc, (vop_t *) ufsspec_close }, { &vop_getattr_desc, (vop_t *) ufs_getattr }, @@ -2276,7 +2197,6 @@ vop_t **ufs_fifoop_p; static struct vnodeopv_entry_desc ufs_fifoop_entries[] = { { &vop_default_desc, (vop_t *) fifo_vnoperate }, { &vop_fsync_desc, (vop_t *) ufs_missingop }, - { &vop_update_desc, (vop_t *) ufs_missingop }, { &vop_access_desc, (vop_t *) ufs_access }, { &vop_close_desc, (vop_t *) ufsfifo_close }, { &vop_getattr_desc, (vop_t *) ufs_getattr }, diff --git a/sys/ufs/ufs/ufsmount.h b/sys/ufs/ufs/ufsmount.h index 50bfe575f51e..ee7963190c89 100644 --- a/sys/ufs/ufs/ufsmount.h +++ b/sys/ufs/ufs/ufsmount.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufsmount.h 8.6 (Berkeley) 3/30/95 - * $Id: ufsmount.h,v 1.10 1997/10/12 20:26:28 phk Exp $ + * $Id: ufsmount.h,v 1.11 1997/10/16 10:50:27 phk Exp $ */ #ifndef _UFS_UFS_UFSMOUNT_H_ @@ -99,12 +99,14 @@ struct ufsmount { struct malloc_type *um_malloctype; /* The inodes malloctype */ int (*um_blkatoff) __P((struct vnode *, off_t, char **, struct buf **)); int (*um_truncate) __P((struct vnode *, off_t, int, struct ucred *, struct proc *)); + int (*um_update) __P((struct vnode *, struct timeval *, struct timeval *, int)); int (*um_valloc) __P((struct vnode *, int, struct ucred *, struct vnode **)); int (*um_vfree) __P((struct vnode *, ino_t, int)); }; #define UFS_BLKATOFF(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_blkatoff(aa, bb, cc, dd) #define UFS_TRUNCATE(aa, bb, cc, dd, ee) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd, ee) +#define UFS_UPDATE(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_update(aa, bb, cc, dd) #define UFS_VALLOC(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_valloc(aa, bb, cc, dd) #define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)->v_mount)->um_vfree(aa, bb, cc)