|
|
| version 1.11, 2003/10/19 21:24:55 | version 1.12, 2004/02/05 21:03:37 |
|---|---|
| Line 58 | Line 58 |
| #include "hpfsmount.h" | #include "hpfsmount.h" |
| #include "hpfs_subr.h" | #include "hpfs_subr.h" |
| #if defined(__FreeBSD__) | #if defined(__DragonFly__) |
| MALLOC_DEFINE(M_HPFSMNT, "HPFS mount", "HPFS mount structure"); | MALLOC_DEFINE(M_HPFSMNT, "HPFS mount", "HPFS mount structure"); |
| MALLOC_DEFINE(M_HPFSNO, "HPFS node", "HPFS node structure"); | MALLOC_DEFINE(M_HPFSNO, "HPFS node", "HPFS node structure"); |
| #endif | #endif |
| Line 75 static int hpfs_vptofh (struct vnode *, | Line 75 static int hpfs_vptofh (struct vnode *, |
| static int hpfs_fhtovp (struct mount *, struct fid *, | static int hpfs_fhtovp (struct mount *, struct fid *, |
| struct vnode **); | struct vnode **); |
| #if !defined(__FreeBSD__) | #if !defined(__DragonFly__) |
| static int hpfs_quotactl (struct mount *, int, uid_t, caddr_t, | static int hpfs_quotactl (struct mount *, int, uid_t, caddr_t, |
| struct proc *); | struct proc *); |
| static int hpfs_start (struct mount *, int, struct proc *); | static int hpfs_start (struct mount *, int, struct proc *); |
| Line 83 static int hpfs_sync (struct mount *, in | Line 83 static int hpfs_sync (struct mount *, in |
| struct proc *); | struct proc *); |
| #endif | #endif |
| #if defined(__FreeBSD__) | #if defined(__DragonFly__) |
| struct sockaddr; | struct sockaddr; |
| static int hpfs_mount (struct mount *, char *, caddr_t, | static int hpfs_mount (struct mount *, char *, caddr_t, |
| struct nameidata *, struct thread *); | struct nameidata *, struct thread *); |
| Line 104 static int hpfs_checkexp (struct mount * | Line 104 static int hpfs_checkexp (struct mount * |
| /*ARGSUSED*/ | /*ARGSUSED*/ |
| static int | static int |
| hpfs_checkexp(mp, nam, exflagsp, credanonp) | hpfs_checkexp(mp, nam, exflagsp, credanonp) |
| #if defined(__FreeBSD__) | #if defined(__DragonFly__) |
| struct mount *mp; | struct mount *mp; |
| struct sockaddr *nam; | struct sockaddr *nam; |
| int *exflagsp; | int *exflagsp; |
| Line 131 hpfs_checkexp(mp, nam, exflagsp, credano | Line 131 hpfs_checkexp(mp, nam, exflagsp, credano |
| return (0); | return (0); |
| } | } |
| #if !defined(__FreeBSD__) | #if !defined(__DragonFly__) |
| /*ARGSUSED*/ | /*ARGSUSED*/ |
| static int | static int |
| hpfs_sysctl(name, namelen, oldp, oldlenp, newp, newlen, td) | hpfs_sysctl(name, namelen, oldp, oldlenp, newp, newlen, td) |
| Line 153 hpfs_mountroot() | Line 153 hpfs_mountroot() |
| } | } |
| #endif | #endif |
| #if defined(__FreeBSD__) | #if defined(__DragonFly__) |
| static int | static int |
| hpfs_init ( | hpfs_init ( |
| struct vfsconf *vcp ) | struct vfsconf *vcp ) |
| Line 165 hpfs_init () | Line 165 hpfs_init () |
| dprintf(("hpfs_init():\n")); | dprintf(("hpfs_init():\n")); |
| hpfs_hphashinit(); | hpfs_hphashinit(); |
| #if defined(__FreeBSD__) | #if defined(__DragonFly__) |
| return 0; | return 0; |
| #endif | #endif |
| } | } |
| Line 173 hpfs_init () | Line 173 hpfs_init () |
| static int | static int |
| hpfs_mount ( | hpfs_mount ( |
| struct mount *mp, | struct mount *mp, |
| #if defined(__FreeBSD__) | #if defined(__DragonFly__) |
| char *path, | char *path, |
| caddr_t data, | caddr_t data, |
| #else /* defined(__NetBSD__) */ | #else /* defined(__NetBSD__) */ |
| Line 239 hpfs_mount ( | Line 239 hpfs_mount ( |
| devvp = ndp->ni_vp; | devvp = ndp->ni_vp; |
| #if defined(__FreeBSD__) | #if defined(__DragonFly__) |
| if (!vn_isdisk(devvp, &err)) | if (!vn_isdisk(devvp, &err)) |
| goto error_2; | goto error_2; |
| #else /* defined(__NetBSD__) */ | #else /* defined(__NetBSD__) */ |
| Line 334 hpfs_mountfs(devvp, mp, argsp, td) | Line 334 hpfs_mountfs(devvp, mp, argsp, td) |
| if (error) | if (error) |
| return (error); | return (error); |
| ncount = vcount(devvp); | ncount = vcount(devvp); |
| #if defined(__FreeBSD__) | #if defined(__DragonFly__) |
| if (devvp->v_object) | if (devvp->v_object) |
| ncount -= 1; | ncount -= 1; |
| #endif | #endif |
| if (ncount > 1 && devvp != rootvp) | if (ncount > 1 && devvp != rootvp) |
| return (EBUSY); | return (EBUSY); |
| #if defined(__FreeBSD__) | #if defined(__DragonFly__) |
| VN_LOCK(devvp, LK_EXCLUSIVE | LK_RETRY, td); | VN_LOCK(devvp, LK_EXCLUSIVE | LK_RETRY, td); |
| error = vinvalbuf(devvp, V_SAVE, td, 0, 0); | error = vinvalbuf(devvp, V_SAVE, td, 0, 0); |
| VOP__UNLOCK(devvp, 0, td); | VOP__UNLOCK(devvp, 0, td); |
| Line 420 hpfs_mountfs(devvp, mp, argsp, td) | Line 420 hpfs_mountfs(devvp, mp, argsp, td) |
| vput(vp); | vput(vp); |
| #if defined(__FreeBSD__) | #if defined(__DragonFly__) |
| mp->mnt_stat.f_fsid.val[0] = (long)dev2udev(dev); | mp->mnt_stat.f_fsid.val[0] = (long)dev2udev(dev); |
| mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum; | mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum; |
| #else | #else |
| Line 436 failed: | Line 436 failed: |
| if (bp) | if (bp) |
| brelse (bp); | brelse (bp); |
| mp->mnt_data = (qaddr_t)NULL; | mp->mnt_data = (qaddr_t)NULL; |
| #if defined(__FreeBSD__) | #if defined(__DragonFly__) |
| devvp->v_specmountpoint = NULL; | devvp->v_specmountpoint = NULL; |
| #else | #else |
| devvp->v_specflags &= ~SI_MOUNTEDON; | devvp->v_specflags &= ~SI_MOUNTEDON; |
| Line 445 failed: | Line 445 failed: |
| return (error); | return (error); |
| } | } |
| #if !defined(__FreeBSD__) | #if !defined(__DragonFly__) |
| static int | static int |
| hpfs_start ( | hpfs_start ( |
| struct mount *mp, | struct mount *mp, |
| Line 481 hpfs_unmount( | Line 481 hpfs_unmount( |
| return (error); | return (error); |
| } | } |
| #if defined(__FreeBSD__) | #if defined(__DragonFly__) |
| hpmp->hpm_devvp->v_specmountpoint = NULL; | hpmp->hpm_devvp->v_specmountpoint = NULL; |
| #else | #else |
| hpmp->hpm_devvp->v_specflags &= ~SI_MOUNTEDON; | hpmp->hpm_devvp->v_specflags &= ~SI_MOUNTEDON; |
| Line 531 hpfs_statfs( | Line 531 hpfs_statfs( |
| dprintf(("hpfs_statfs(): HPFS%d.%d\n", | dprintf(("hpfs_statfs(): HPFS%d.%d\n", |
| hpmp->hpm_su.su_hpfsver, hpmp->hpm_su.su_fnctver)); | hpmp->hpm_su.su_hpfsver, hpmp->hpm_su.su_fnctver)); |
| #if defined(__FreeBSD__) | #if defined(__DragonFly__) |
| sbp->f_type = mp->mnt_vfc->vfc_typenum; | sbp->f_type = mp->mnt_vfc->vfc_typenum; |
| #else /* defined(__NetBSD__) */ | #else /* defined(__NetBSD__) */ |
| sbp->f_type = 0; | sbp->f_type = 0; |
| Line 553 hpfs_statfs( | Line 553 hpfs_statfs( |
| return (0); | return (0); |
| } | } |
| #if !defined(__FreeBSD__) | #if !defined(__DragonFly__) |
| static int | static int |
| hpfs_sync ( | hpfs_sync ( |
| struct mount *mp, | struct mount *mp, |
| Line 723 hpfs_vget( | Line 723 hpfs_vget( |
| return (0); | return (0); |
| } | } |
| #if defined(__FreeBSD__) | #if defined(__DragonFly__) |
| static struct vfsops hpfs_vfsops = { | static struct vfsops hpfs_vfsops = { |
| hpfs_mount, | hpfs_mount, |
| vfs_stdstart, | vfs_stdstart, |