From 22a31ae0e6fcdd971f4a447c74bb34bc849cfd59 Mon Sep 17 00:00:00 2001 From: tjr Date: Sat, 8 Feb 2003 05:48:04 +0000 Subject: Revert removal of vnode and VFS stubs; bp asserts that they are needed. --- sys/fs/smbfs/smbfs.h | 2 ++ sys/fs/smbfs/smbfs_vfsops.c | 48 +++++++++++++++++++++++++++++++++--- sys/fs/smbfs/smbfs_vnops.c | 60 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 107 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/fs/smbfs/smbfs.h b/sys/fs/smbfs/smbfs.h index 7519346..5048791 100644 --- a/sys/fs/smbfs/smbfs.h +++ b/sys/fs/smbfs/smbfs.h @@ -72,6 +72,7 @@ MALLOC_DECLARE(M_SMBFSMNT); struct smbnode; struct smb_share; struct u_cred; +struct vop_ioctl_args; struct buf; struct smbmount { @@ -96,6 +97,7 @@ struct smbmount { #define VTOVFS(vp) ((vp)->v_mount) #define VTOSMBFS(vp) (VFSTOSMBFS(VTOVFS(vp))) +int smbfs_ioctl(struct vop_ioctl_args *ap); int smbfs_doio(struct buf *bp, struct ucred *cr, struct thread *td); int smbfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred, struct thread *td, int intrflg); diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c index 7d562b9..db0bc84 100644 --- a/sys/fs/smbfs/smbfs_vfsops.c +++ b/sys/fs/smbfs/smbfs_vfsops.c @@ -79,18 +79,21 @@ static MALLOC_DEFINE(M_SMBFSHASH, "SMBFS hash", "SMBFS hash table"); static int smbfs_mount(struct mount *, char *, caddr_t, struct nameidata *, struct thread *); +static int smbfs_quotactl(struct mount *, int, uid_t, caddr_t, struct thread *); static int smbfs_root(struct mount *, struct vnode **); +static int smbfs_start(struct mount *, int, struct thread *); static int smbfs_statfs(struct mount *, struct statfs *, struct thread *); static int smbfs_sync(struct mount *, int, struct ucred *, struct thread *); static int smbfs_unmount(struct mount *, int, struct thread *); static int smbfs_init(struct vfsconf *vfsp); +static int smbfs_uninit(struct vfsconf *vfsp); static struct vfsops smbfs_vfsops = { smbfs_mount, - vfs_stdstart, + smbfs_start, smbfs_unmount, smbfs_root, - vfs_stdquotactl, + smbfs_quotactl, smbfs_statfs, smbfs_sync, vfs_stdvget, @@ -98,7 +101,7 @@ static struct vfsops smbfs_vfsops = { vfs_stdcheckexp, vfs_stdvptofh, /* shouldn't happen */ smbfs_init, - vfs_stduninit, + smbfs_uninit, vfs_stdextattrctl }; @@ -309,6 +312,36 @@ smbfs_root(struct mount *mp, struct vnode **vpp) return 0; } +/* + * Vfs start routine, a no-op. + */ +/* ARGSUSED */ +static int +smbfs_start(mp, flags, td) + struct mount *mp; + int flags; + struct thread *td; +{ + SMBVDEBUG("flags=%04x\n", flags); + return 0; +} + +/* + * Do operations associated with quotas, not supported + */ +/* ARGSUSED */ +static int +smbfs_quotactl(mp, cmd, uid, arg, td) + struct mount *mp; + int cmd; + uid_t uid; + caddr_t arg; + struct thread *td; +{ + SMBVDEBUG("return EOPNOTSUPP\n"); + return EOPNOTSUPP; +} + /*ARGSUSED*/ int smbfs_init(struct vfsconf *vfsp) @@ -332,6 +365,15 @@ smbfs_init(struct vfsconf *vfsp) return 0; } +/*ARGSUSED*/ +int +smbfs_uninit(struct vfsconf *vfsp) +{ + + SMBVDEBUG("done.\n"); + return 0; +} + /* * smbfs_statfs call */ diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c index a618251..29ff1d7 100644 --- a/sys/fs/smbfs/smbfs_vnops.c +++ b/sys/fs/smbfs/smbfs_vnops.c @@ -62,6 +62,7 @@ * Prototypes for SMBFS vnode operations */ static int smbfs_create(struct vop_create_args *); +static int smbfs_mknod(struct vop_mknod_args *); static int smbfs_open(struct vop_open_args *); static int smbfs_close(struct vop_close_args *); static int smbfs_access(struct vop_access_args *); @@ -71,10 +72,12 @@ static int smbfs_read(struct vop_read_args *); static int smbfs_write(struct vop_write_args *); static int smbfs_fsync(struct vop_fsync_args *); static int smbfs_remove(struct vop_remove_args *); +static int smbfs_link(struct vop_link_args *); static int smbfs_lookup(struct vop_lookup_args *); static int smbfs_rename(struct vop_rename_args *); static int smbfs_mkdir(struct vop_mkdir_args *); static int smbfs_rmdir(struct vop_rmdir_args *); +static int smbfs_symlink(struct vop_symlink_args *); static int smbfs_readdir(struct vop_readdir_args *); static int smbfs_strategy(struct vop_strategy_args *); static int smbfs_print(struct vop_print_args *); @@ -95,8 +98,11 @@ static struct vnodeopv_entry_desc smbfs_vnodeop_entries[] = { { &vop_getattr_desc, (vop_t *) smbfs_getattr }, { &vop_getpages_desc, (vop_t *) smbfs_getpages }, { &vop_inactive_desc, (vop_t *) smbfs_inactive }, + { &vop_ioctl_desc, (vop_t *) smbfs_ioctl }, + { &vop_link_desc, (vop_t *) smbfs_link }, { &vop_lookup_desc, (vop_t *) smbfs_lookup }, { &vop_mkdir_desc, (vop_t *) smbfs_mkdir }, + { &vop_mknod_desc, (vop_t *) smbfs_mknod }, { &vop_open_desc, (vop_t *) smbfs_open }, { &vop_pathconf_desc, (vop_t *) smbfs_pathconf }, { &vop_print_desc, (vop_t *) smbfs_print }, @@ -109,6 +115,7 @@ static struct vnodeopv_entry_desc smbfs_vnodeop_entries[] = { { &vop_rmdir_desc, (vop_t *) smbfs_rmdir }, { &vop_setattr_desc, (vop_t *) smbfs_setattr }, { &vop_strategy_desc, (vop_t *) smbfs_strategy }, + { &vop_symlink_desc, (vop_t *) smbfs_symlink }, { &vop_write_desc, (vop_t *) smbfs_write }, #ifndef FB_RELENG3 { &vop_getextattr_desc, (vop_t *) smbfs_getextattr }, @@ -666,6 +673,45 @@ out: return error; } +/* + * somtime it will come true... + */ +static int +smbfs_link(ap) + struct vop_link_args /* { + struct vnode *a_tdvp; + struct vnode *a_vp; + struct componentname *a_cnp; + } */ *ap; +{ + return EOPNOTSUPP; +} + +/* + * smbfs_symlink link create call. + * Sometime it will be functional... + */ +static int +smbfs_symlink(ap) + struct vop_symlink_args /* { + struct vnode *a_dvp; + struct vnode **a_vpp; + struct componentname *a_cnp; + struct vattr *a_vap; + char *a_target; + } */ *ap; +{ + return EOPNOTSUPP; +} + +static int +smbfs_mknod(ap) + struct vop_mknod_args /* { + } */ *ap; +{ + return EOPNOTSUPP; +} + static int smbfs_mkdir(ap) struct vop_mkdir_args /* { @@ -858,6 +904,20 @@ smbfs_strategy (ap) return error; } +int +smbfs_ioctl(ap) + struct vop_ioctl_args /* { + struct vnode *a_vp; + u_long a_command; + caddr_t a_data; + int fflag; + struct ucred *cred; + struct thread *td; + } */ *ap; +{ + return ENOTTY; +} + static char smbfs_atl[] = "rhsvda"; static int smbfs_getextattr(struct vop_getextattr_args *ap) -- cgit v1.1