Diff for /src/sys/vfs/ntfs/ntfs_vfsops.c between versions 1.13 and 1.14

version 1.13, 2004/03/01 06:33:22 version 1.14, 2004/04/20 19:59:30
Line 118  static int ntfs_checkexp (struct mount * Line 118  static int ntfs_checkexp (struct mount *
  * exflagsp and credanonp.   * exflagsp and credanonp.
  */   */
 static int  static int
 ntfs_checkexp(mp, nam, exflagsp, credanonp)  ntfs_checkexp(struct mount *mp,
 #if defined(__DragonFly__)  #if defined(__DragonFly__)
         struct mount *mp;                struct sockaddr *nam,
         struct sockaddr *nam;  
         int *exflagsp;  
         struct ucred **credanonp;  
 #else /* defined(__NetBSD__) */  #else /* defined(__NetBSD__) */
         struct mount *mp;                struct mbuf *nam,
         struct mbuf *nam;  
         int *exflagsp;  
         struct ucred **credanonp;  
 #endif  #endif
                 int *exflagsp, struct ucred **credanonp)
 {  {
         struct netcred *np;          struct netcred *np;
         struct ntfsmount *ntm = VFSTONTFS(mp);          struct ntfsmount *ntm = VFSTONTFS(mp);
Line 149  ntfs_checkexp(mp, nam, exflagsp, credano Line 144  ntfs_checkexp(mp, nam, exflagsp, credano
 #if defined(__NetBSD__)  #if defined(__NetBSD__)
 /*ARGSUSED*/  /*ARGSUSED*/
 static int  static int
 ntfs_sysctl(name, namelen, oldp, oldlenp, newp, newlen, td)  ntfs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
         int *name;              size_t newlen, struct thread *td)
         u_int namelen;  
         void *oldp;  
         size_t *oldlenp;  
         void *newp;  
         size_t newlen;  
         struct thread *td;  
 {  {
         return (EINVAL);          return (EINVAL);
 }  }
   
 static int  static int
 ntfs_mountroot()  ntfs_mountroot(void)
 {  {
         struct mount *mp;          struct mount *mp;
         extern struct vnode *rootvp;          extern struct vnode *rootvp;
Line 207  ntfs_mountroot() Line 196  ntfs_mountroot()
 }  }
   
 static void  static void
 ntfs_init ()  ntfs_init(void)
 {  {
         ntfs_nthashinit();          ntfs_nthashinit();
         ntfs_toupper_init();          ntfs_toupper_init();
Line 216  ntfs_init () Line 205  ntfs_init ()
 #elif defined(__DragonFly__)  #elif defined(__DragonFly__)
   
 static int  static int
 ntfs_init (  ntfs_init(struct vfsconf *vcp)
         struct vfsconf *vcp )  
 {  {
         ntfs_nthashinit();          ntfs_nthashinit();
         ntfs_toupper_init();          ntfs_toupper_init();
Line 227  ntfs_init ( Line 215  ntfs_init (
 #endif /* NetBSD */  #endif /* NetBSD */
   
 static int  static int
 ntfs_mount (   ntfs_mount(struct mount *mp,
         struct mount *mp,  
 #if defined(__DragonFly__)  #if defined(__DragonFly__)
         char *path,             char *path, caddr_t data,
         caddr_t data,  
 #else  #else
         const char *path,             const char *path, void *data,
         void *data,  
 #endif  #endif
         struct nameidata *ndp,             struct nameidata *ndp, struct thread *td)
         struct thread *td  {
 ) {  
         size_t          size;          size_t          size;
         int             err = 0;          int             err = 0;
         struct vnode    *devvp;          struct vnode    *devvp;
Line 421  success: Line 405  success:
  * Common code for mount and mountroot   * Common code for mount and mountroot
  */   */
 int  int
 ntfs_mountfs(devvp, mp, argsp, td)  ntfs_mountfs(struct vnode *devvp, struct mount *mp, struct ntfs_args *argsp,
         struct vnode *devvp;               struct thread *td)
         struct mount *mp;  
         struct ntfs_args *argsp;  
         struct thread *td;  
 {  {
         struct buf *bp;          struct buf *bp;
         struct ntfsmount *ntmp;          struct ntfsmount *ntmp;
Line 642  out: Line 623  out:
   
 #if !defined(__DragonFly__)  #if !defined(__DragonFly__)
 static int  static int
 ntfs_start (  ntfs_start(struct mount *mp, int flags, struct thread *td)
         struct mount *mp,  
         int flags,  
         struct thread *td)  
 {  {
         return (0);          return (0);
 }  }
 #endif  #endif
   
 static int  static int
 ntfs_unmount(   ntfs_unmount(struct mount *mp, int mntflags, struct thread *td)
         struct mount *mp,  
         int mntflags,  
         struct thread *td)  
 {  {
         struct ntfsmount *ntmp;          struct ntfsmount *ntmp;
         int error, ronly = 0, flags, i;          int error, ronly = 0, flags, i;
Line 722  ntfs_unmount( Line 697  ntfs_unmount(
 }  }
   
 static int  static int
 ntfs_root(  ntfs_root(struct mount *mp, struct vnode **vpp)
         struct mount *mp,  
         struct vnode **vpp )  
 {  {
         struct vnode *nvp;          struct vnode *nvp;
         int error = 0;          int error = 0;
Line 743  ntfs_root( Line 716  ntfs_root(
   
 #if !defined(__DragonFly__)  #if !defined(__DragonFly__)
 static int  static int
 ntfs_quotactl (   ntfs_quotactl(struct mount *mp, int cmds, uid_t uid, caddr_t arg,
         struct mount *mp,                struct thread *td)
         int cmds,  
         uid_t uid,  
         caddr_t arg,  
         struct thread *td)  
 {  {
         printf("\nntfs_quotactl():\n");          printf("\nntfs_quotactl():\n");
         return EOPNOTSUPP;          return EOPNOTSUPP;
Line 756  ntfs_quotactl ( Line 725  ntfs_quotactl (
 #endif  #endif
   
 int  int
 ntfs_calccfree(  ntfs_calccfree(struct ntfsmount *ntmp, cn_t *cfreep)
         struct ntfsmount *ntmp,  
         cn_t *cfreep)  
 {  {
         struct vnode *vp;          struct vnode *vp;
         u_int8_t *tmp;          u_int8_t *tmp;
Line 788  ntfs_calccfree( Line 755  ntfs_calccfree(
 }  }
   
 static int  static int
 ntfs_statfs(  ntfs_statfs(struct mount *mp, struct statfs *sbp, struct thread *td)
         struct mount *mp,  
         struct statfs *sbp,  
         struct thread *td)  
 {  {
         struct ntfsmount *ntmp = VFSTONTFS(mp);          struct ntfsmount *ntmp = VFSTONTFS(mp);
         u_int64_t mftsize,mftallocated;          u_int64_t mftsize,mftallocated;
Line 831  ntfs_statfs( Line 795  ntfs_statfs(
   
 #if !defined(__DragonFly__)  #if !defined(__DragonFly__)
 static int  static int
 ntfs_sync (  ntfs_sync(struct mount *mp, int waitfor, struct ucred *cred, struct thread *td)
         struct mount *mp,  
         int waitfor,  
         struct ucred *cred,  
         struct thread *td)  
 {  {
         /*dprintf(("ntfs_sync():\n"));*/          /*dprintf(("ntfs_sync():\n"));*/
         return (0);          return (0);
Line 844  ntfs_sync ( Line 804  ntfs_sync (
   
 /*ARGSUSED*/  /*ARGSUSED*/
 static int  static int
 ntfs_fhtovp(  ntfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp)
         struct mount *mp,  
         struct fid *fhp,  
         struct vnode **vpp)  
 {  {
         struct vnode *nvp;          struct vnode *nvp;
         struct ntfid *ntfhp = (struct ntfid *)fhp;          struct ntfid *ntfhp = (struct ntfid *)fhp;
Line 867  ntfs_fhtovp( Line 824  ntfs_fhtovp(
 }  }
   
 static int  static int
 ntfs_vptofh(  ntfs_vptofh(struct vnode *vp, struct fid *fhp)
         struct vnode *vp,  
         struct fid *fhp)  
 {  {
         struct ntnode *ntp;          struct ntnode *ntp;
         struct ntfid *ntfhp;          struct ntfid *ntfhp;
Line 885  ntfs_vptofh( Line 840  ntfs_vptofh(
 }  }
   
 int  int
 ntfs_vgetex(  ntfs_vgetex(struct mount *mp, ino_t ino, u_int32_t attrtype, char *attrname,
         struct mount *mp,              u_long lkflags, u_long flags, struct thread *td,
         ino_t ino,              struct vnode **vpp) 
         u_int32_t attrtype,  
         char *attrname,  
         u_long lkflags,  
         u_long flags,  
         struct thread *td,  
         struct vnode **vpp)   
 {  {
         int error;          int error;
         struct ntfsmount *ntmp;          struct ntfsmount *ntmp;
Line 998  ntfs_vgetex( Line 947  ntfs_vgetex(
 }  }
   
 static int  static int
 ntfs_vget(  ntfs_vget(struct mount *mp, ino_t ino, struct vnode **vpp) 
         struct mount *mp,  
         ino_t ino,  
         struct vnode **vpp)   
 {  {
         return ntfs_vgetex(mp, ino, NTFS_A_DATA, NULL,          return ntfs_vgetex(mp, ino, NTFS_A_DATA, NULL,
                         LK_EXCLUSIVE | LK_RETRY, 0, curthread, vpp);                          LK_EXCLUSIVE | LK_RETRY, 0, curthread, vpp);

Removed from v.1.13  
changed lines
  Added in v.1.14