From 1be5bc745944fb97159c5edc40c59dfd8998cbf1 Mon Sep 17 00:00:00 2001 From: Tom Rhodes Date: Fri, 1 Jun 2007 17:06:46 +0000 Subject: [PATCH] Revert previous, part of NFS that I didn't know about. --- sys/fs/msdosfs/msdosfs_vfsops.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 699c0ef465c6..3b53b0af8135 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -106,6 +106,7 @@ struct iconv_functions *msdosfs_iconv = NULL; static int update_mp(struct mount *mp, struct thread *td); static int mountmsdosfs(struct vnode *devvp, struct mount *mp, struct thread *td); +static vfs_fhtovp_t msdosfs_fhtovp; static vfs_mount_t msdosfs_mount; static vfs_root_t msdosfs_root; static vfs_statfs_t msdosfs_statfs; @@ -911,7 +912,26 @@ msdosfs_sync(struct mount *mp, int waitfor, struct thread *td) return (allerror); } +static int +msdosfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) +{ + struct msdosfsmount *pmp = VFSTOMSDOSFS(mp); + struct defid *defhp = (struct defid *) fhp; + struct denode *dep; + int error; + + error = deget(pmp, defhp->defid_dirclust, defhp->defid_dirofs, &dep); + if (error) { + *vpp = NULLVP; + return (error); + } + *vpp = DETOV(dep); + vnode_create_vobject(*vpp, dep->de_FileSize, curthread); + return (0); +} + static struct vfsops msdosfs_vfsops = { + .vfs_fhtovp = msdosfs_fhtovp, .vfs_mount = msdosfs_mount, .vfs_cmount = msdosfs_cmount, .vfs_root = msdosfs_root,