diff --git a/sys/ntfs/ntfs.h b/sys/ntfs/ntfs.h index 1b1e9ea14cea..8d1c23612667 100644 --- a/sys/ntfs/ntfs.h +++ b/sys/ntfs/ntfs.h @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs.h,v 1.2 1999/05/06 15:43:17 christos Exp $ */ +/* $NetBSD: ntfs.h,v 1.3 1999/07/26 14:02:30 jdolecek Exp $ */ /*- * Copyright (c) 1998, 1999 Semen Ustimenko @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: ntfs.h,v 1.4 1999/04/20 21:06:41 semenu Exp + * Id: ntfs.h,v 1.5 1999/05/12 09:42:51 semenu Exp */ /*#define NTFS_DEBUG 1*/ diff --git a/sys/ntfs/ntfs_compr.c b/sys/ntfs/ntfs_compr.c index 851375cbff25..2ff6d314ce02 100644 --- a/sys/ntfs/ntfs_compr.c +++ b/sys/ntfs/ntfs_compr.c @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs_compr.c,v 1.2 1999/05/06 15:43:18 christos Exp $ */ +/* $NetBSD: ntfs_compr.c,v 1.3 1999/07/26 14:02:31 jdolecek Exp $ */ /*- * Copyright (c) 1998, 1999 Semen Ustimenko @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: ntfs_compr.c,v 1.3 1999/04/20 21:06:43 semenu Exp + * Id: ntfs_compr.c,v 1.4 1999/05/12 09:42:54 semenu Exp */ #include diff --git a/sys/ntfs/ntfs_compr.h b/sys/ntfs/ntfs_compr.h index cf461b8efa26..cd86ac761476 100644 --- a/sys/ntfs/ntfs_compr.h +++ b/sys/ntfs/ntfs_compr.h @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs_compr.h,v 1.2 1999/05/06 15:43:18 christos Exp $ */ +/* $NetBSD: ntfs_compr.h,v 1.3 1999/07/26 14:02:31 jdolecek Exp $ */ /*- * Copyright (c) 1998, 1999 Semen Ustimenko @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: ntfs_compr.h,v 1.3 1999/04/20 21:06:43 semenu Exp + * Id: ntfs_compr.h,v 1.4 1999/05/12 09:42:55 semenu Exp */ #define NTFS_COMPBLOCK_SIZE 0x1000 diff --git a/sys/ntfs/ntfs_extern.h b/sys/ntfs/ntfs_extern.h index ca0613d1cc86..d60fc619e0de 100644 --- a/sys/ntfs/ntfs_extern.h +++ b/sys/ntfs/ntfs_extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs_extern.h,v 1.2 1999/05/06 15:43:18 christos Exp $ */ +/* $NetBSD: ntfs_extern.h,v 1.3 1999/07/26 14:02:31 jdolecek Exp $ */ /*- * Copyright (c) 1998, 1999 Semen Ustimenko @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: ntfs_extern.h,v 1.3 1999/04/20 21:06:43 semenu Exp + * Id: ntfs_extern.h,v 1.4 1999/05/12 09:42:57 semenu Exp */ struct sockaddr; diff --git a/sys/ntfs/ntfs_ihash.c b/sys/ntfs/ntfs_ihash.c index e6d7c7188375..7cd3f90da458 100644 --- a/sys/ntfs/ntfs_ihash.c +++ b/sys/ntfs/ntfs_ihash.c @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs_ihash.c,v 1.2 1999/05/06 15:43:19 christos Exp $ */ +/* $NetBSD: ntfs_ihash.c,v 1.3 1999/07/26 14:02:31 jdolecek Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1991, 1993, 1995 @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95 - * Id: ntfs_ihash.c,v 1.3 1999/04/20 21:06:43 semenu Exp + * Id: ntfs_ihash.c,v 1.5 1999/05/12 09:42:58 semenu Exp */ #include @@ -55,7 +55,7 @@ MALLOC_DEFINE(M_NTFSNTHASH, "NTFS nthash", "NTFS ntnode hash tables"); */ static LIST_HEAD(nthashhead, ntnode) *ntfs_nthashtbl; static u_long ntfs_nthash; /* size of hash table - 1 */ -#define NTNOHASH(device, inum) (&ntfs_nthashtbl[((device) + (inum)) & ntfs_nthash]) +#define NTNOHASH(device, inum) (&ntfs_nthashtbl[(minor(device) + (inum)) & ntfs_nthash]) #ifndef NULL_SIMPLELOCKS static struct simplelock ntfs_nthash_slock; #endif diff --git a/sys/ntfs/ntfs_ihash.h b/sys/ntfs/ntfs_ihash.h index 4e25276cd587..6f8c309c27ff 100644 --- a/sys/ntfs/ntfs_ihash.h +++ b/sys/ntfs/ntfs_ihash.h @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs_ihash.h,v 1.2 1999/05/06 15:43:19 christos Exp $ */ +/* $NetBSD: ntfs_ihash.h,v 1.3 1999/07/26 14:02:31 jdolecek Exp $ */ /*- * Copyright (c) 1998, 1999 Semen Ustimenko @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: ntfs_ihash.h,v 1.2 1999/04/20 21:06:43 semenu Exp + * Id: ntfs_ihash.h,v 1.3 1999/05/12 09:42:59 semenu Exp */ void ntfs_nthashinit __P((void)); diff --git a/sys/ntfs/ntfs_inode.h b/sys/ntfs/ntfs_inode.h index 69fcbdc3e78e..848e0045a3f0 100644 --- a/sys/ntfs/ntfs_inode.h +++ b/sys/ntfs/ntfs_inode.h @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs_inode.h,v 1.2 1999/05/06 15:43:19 christos Exp $ */ +/* $NetBSD: ntfs_inode.h,v 1.3 1999/07/26 14:02:31 jdolecek Exp $ */ /*- * Copyright (c) 1998, 1999 Semen Ustimenko @@ -25,11 +25,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: ntfs_inode.h,v 1.3 1999/04/20 21:06:43 semenu Exp + * Id: ntfs_inode.h,v 1.4 1999/05/12 09:43:00 semenu Exp */ /* These flags are kept in i_flag. */ -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) #define IN_ACCESS 0x0001 /* Access time update request. */ #define IN_CHANGE 0x0002 /* Inode change time update request. */ #define IN_UPDATE 0x0004 /* Modification time update request. */ @@ -38,7 +38,7 @@ #define IN_SHLOCK 0x0020 /* File has shared lock. */ #define IN_EXLOCK 0x0040 /* File has exclusive lock. */ #define IN_LAZYMOD 0x0080 /* Modified, but don't write yet. */ -#else +#else /* defined(__NetBSD__) */ #define IN_ACCESS 0x0001 /* Access time update request. */ #define IN_CHANGE 0x0002 /* Inode change time update request. */ #define IN_EXLOCK 0x0004 /* File has exclusive lock. */ @@ -66,7 +66,7 @@ struct ntnode { u_int32_t i_flag; int i_lock; int i_usecount; -#if __FreeBSD_version < 300000 +#if defined(__NetBSD__) pid_t i_lockholder; pid_t i_lockwaiter; int i_lockcount; diff --git a/sys/ntfs/ntfs_subr.c b/sys/ntfs/ntfs_subr.c index e88cabe6accc..545ccb126b23 100644 --- a/sys/ntfs/ntfs_subr.c +++ b/sys/ntfs/ntfs_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs_subr.c,v 1.3 1999/05/18 00:22:41 thorpej Exp $ */ +/* $NetBSD: ntfs_subr.c,v 1.4 1999/07/26 14:02:31 jdolecek Exp $ */ /*- * Copyright (c) 1998, 1999 Semen Ustimenko (semenu@FreeBSD.org) @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: ntfs_subr.c,v 1.3 1999/04/20 21:06:43 semenu Exp + * Id: ntfs_subr.c,v 1.4 1999/05/12 09:43:01 semenu Exp */ #include @@ -39,7 +39,7 @@ #include #include #include -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) #include #endif @@ -55,7 +55,7 @@ #include #include -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) MALLOC_DEFINE(M_NTFSNTVATTR, "NTFS vattr", "NTFS file attribute information"); MALLOC_DEFINE(M_NTFSRDATA, "NTFS res data", "NTFS resident data"); MALLOC_DEFINE(M_NTFSRUN, "NTFS vrun", "NTFS vrun storage"); diff --git a/sys/ntfs/ntfs_subr.h b/sys/ntfs/ntfs_subr.h index 87437b8a58d5..3dff0dc4e1e2 100644 --- a/sys/ntfs/ntfs_subr.h +++ b/sys/ntfs/ntfs_subr.h @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs_subr.h,v 1.2 1999/05/06 15:43:20 christos Exp $ */ +/* $NetBSD: ntfs_subr.h,v 1.3 1999/07/26 14:02:32 jdolecek Exp $ */ /*- * Copyright (c) 1998, 1999 Semen Ustimenko @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: ntfs_subr.h,v 1.3 1999/04/20 21:06:43 semenu Exp + * Id: ntfs_subr.h,v 1.4 1999/05/12 09:43:02 semenu Exp */ #define VA_LOADED 0x0001 diff --git a/sys/ntfs/ntfs_vfsops.c b/sys/ntfs/ntfs_vfsops.c index 6baa398474ac..9facf587ee1e 100644 --- a/sys/ntfs/ntfs_vfsops.c +++ b/sys/ntfs/ntfs_vfsops.c @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs_vfsops.c,v 1.3 1999/05/18 00:22:41 thorpej Exp $ */ +/* $NetBSD: ntfs_vfsops.c,v 1.4 1999/07/26 14:02:32 jdolecek Exp $ */ /*- * Copyright (c) 1998, 1999 Semen Ustimenko @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: ntfs_vfsops.c,v 1.3 1999/04/20 21:06:43 semenu Exp + * Id: ntfs_vfsops.c,v 1.7 1999/05/31 11:28:30 phk Exp */ @@ -59,14 +59,14 @@ #include #include -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) MALLOC_DEFINE(M_NTFSMNT, "NTFS mount", "NTFS mount structure"); MALLOC_DEFINE(M_NTFSNTNODE,"NTFS ntnode", "NTFS ntnode information"); MALLOC_DEFINE(M_NTFSFNODE,"NTFS fnode", "NTFS fnode information"); MALLOC_DEFINE(M_NTFSDIR,"NTFS dir", "NTFS dir buffer"); #endif -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) static int ntfs_mount __P((struct mount *, char *, caddr_t, struct nameidata *, struct proc *)); #else @@ -88,7 +88,7 @@ static int ntfs_mountfs __P((register struct vnode *, struct mount *, struct ntfs_args *, struct proc *)); static int ntfs_vptofh __P((struct vnode *, struct fid *)); -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) static int ntfs_init __P((struct vfsconf *)); static int ntfs_fhtovp __P((struct mount *, struct fid *, struct sockaddr *, struct vnode **, @@ -143,7 +143,7 @@ ntfs_mountroot() } #endif -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) static int ntfs_init ( struct vfsconf *vcp ) @@ -156,7 +156,7 @@ ntfs_init () #endif { ntfs_nthashinit(); -#ifndef __NetBSD__ +#if !defined(__NetBSD__) return 0; #endif } @@ -164,7 +164,7 @@ ntfs_init () static int ntfs_mount ( struct mount *mp, -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) char *path, caddr_t data, #else @@ -296,7 +296,7 @@ ntfs_mount ( err = ENOTBLK; goto error_2; } - if (major(devvp->v_rdev) >= nblkdev) { + if (bdevsw(devvp->v_rdev) == NULL) { err = ENXIO; goto error_2; } @@ -406,13 +406,13 @@ ntfs_mountfs(devvp, mp, argsp, p) if (error) return (error); ncount = vcount(devvp); -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) if (devvp->v_object) ncount -= 1; #endif if (ncount > 1 && devvp != rootvp) return (EBUSY); -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p); error = vinvalbuf(devvp, V_SAVE, p->p_ucred, p, 0, 0); VOP_UNLOCK(devvp, 0, p); @@ -561,15 +561,15 @@ ntfs_mountfs(devvp, mp, argsp, p) vput(vp); } - mp->mnt_stat.f_fsid.val[0] = (long)dev; -#if __FreeBSD_version >= 300000 + mp->mnt_stat.f_fsid.val[0] = dev2udev(dev); +#if defined(__FreeBSD__) mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum; #else mp->mnt_stat.f_fsid.val[1] = makefstype(MOUNT_NTFS); #endif mp->mnt_maxsymlinklen = 0; mp->mnt_flag |= MNT_LOCAL; -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) devvp->v_specmountpoint = mp; #else devvp->v_specflags |= SI_MOUNTEDON; @@ -584,7 +584,7 @@ out1: printf("ntfs_mountfs: vflush failed\n"); out: -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) devvp->v_specmountpoint = NULL; #else devvp->v_specflags &= ~SI_MOUNTEDON; @@ -641,7 +641,7 @@ ntfs_unmount( if (error) printf("ntfs_unmount: vflush failed(sysnodes): %d\n",error); -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) ntmp->ntm_devvp->v_specmountpoint = NULL; #else ntmp->ntm_devvp->v_specflags &= ~SI_MOUNTEDON; @@ -749,7 +749,7 @@ ntfs_statfs( mftsize = VTOF(ntmp->ntm_sysvn[NTFS_MFTINO])->f_size; mftallocated = VTOF(ntmp->ntm_sysvn[NTFS_MFTINO])->f_allocated; -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) sbp->f_type = mp->mnt_vfc->vfc_typenum; #elif defined(__NetBSD__) sbp->f_type = 0; @@ -788,7 +788,7 @@ ntfs_sync ( /*ARGSUSED*/ static int ntfs_fhtovp( -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) struct mount *mp, struct fid *fhp, struct sockaddr *nam, @@ -940,7 +940,7 @@ ntfs_vget( LK_EXCLUSIVE, 0, curproc, vpp); } -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) static struct vfsops ntfs_vfsops = { ntfs_mount, ntfs_start, @@ -953,7 +953,6 @@ static struct vfsops ntfs_vfsops = { ntfs_fhtovp, ntfs_vptofh, ntfs_init, - NULL, NULL }; VFS_SET(ntfs_vfsops, ntfs, 0); diff --git a/sys/ntfs/ntfs_vfsops.h b/sys/ntfs/ntfs_vfsops.h index 0f2b31997d93..f64c1d68cc30 100644 --- a/sys/ntfs/ntfs_vfsops.h +++ b/sys/ntfs/ntfs_vfsops.h @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs_vfsops.h,v 1.2 1999/05/06 15:43:20 christos Exp $ */ +/* $NetBSD: ntfs_vfsops.h,v 1.3 1999/07/26 14:02:32 jdolecek Exp $ */ /*- * Copyright (c) 1998, 1999 Semen Ustimenko (semenu@FreeBSD.org) @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: ntfs_vfsops.h,v 1.2 1999/04/20 21:06:43 semenu Exp + * Id: ntfs_vfsops.h,v 1.3 1999/05/12 09:43:06 semenu Exp */ #define VG_DONTLOADIN 0x0001 /* Tells ntfs_vgetex to do not call */ /* ntfs_loadnode on ntnode, even if */ diff --git a/sys/ntfs/ntfs_vnops.c b/sys/ntfs/ntfs_vnops.c index edfdda3b3337..22c9b8b5d979 100644 --- a/sys/ntfs/ntfs_vnops.c +++ b/sys/ntfs/ntfs_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs_vnops.c,v 1.3 1999/07/08 01:06:04 wrstuden Exp $ */ +/* $NetBSD: ntfs_vnops.c,v 1.4 1999/07/26 14:02:32 jdolecek Exp $ */ /* * Copyright (c) 1992, 1993 @@ -35,7 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: ntfs_vnops.c,v 1.3 1999/04/20 21:06:43 semenu Exp + * Id: ntfs_vnops.c,v 1.5 1999/05/12 09:43:06 semenu Exp * */ @@ -59,7 +59,7 @@ #include #include #include -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) #include #endif #include @@ -85,7 +85,7 @@ static int ntfs_inactive __P((struct vop_inactive_args *ap)); static int ntfs_print __P((struct vop_print_args *ap)); static int ntfs_reclaim __P((struct vop_reclaim_args *ap)); static int ntfs_strategy __P((struct vop_strategy_args *ap)); -#if (__FreeBSD_version < 300000) && (__NetBSD_Version__ < 104050000) +#if defined(__NetBSD__) static int ntfs_islocked __P((struct vop_islocked_args *ap)); static int ntfs_unlock __P((struct vop_unlock_args *ap)); static int ntfs_lock __P((struct vop_lock_args *ap)); @@ -96,7 +96,7 @@ static int ntfs_close __P((struct vop_close_args *ap)); static int ntfs_readdir __P((struct vop_readdir_args *ap)); static int ntfs_lookup __P((struct vop_lookup_args *ap)); static int ntfs_bmap __P((struct vop_bmap_args *ap)); -#ifndef __NetBSD__ +#if defined(__FreeBSD__) static int ntfs_getpages __P((struct vop_getpages_args *ap)); static int ntfs_putpages __P((struct vop_putpages_args *)); #endif @@ -104,7 +104,7 @@ static int ntfs_fsync __P((struct vop_fsync_args *ap)); int ntfs_prtactive = 1; /* 1 => print out reclaim of active vnodes */ -#ifndef __NetBSD__ +#if defined(__FreeBSD__) int ntfs_getpages(ap) struct vop_getpages_args *ap; @@ -143,7 +143,7 @@ ntfs_bmap(ap) *ap->a_bnp = ap->a_bn; if (ap->a_runp != NULL) *ap->a_runp = 0; -#ifndef __NetBSD__ +#if !defined(__NetBSD__) if (ap->a_runb != NULL) *ap->a_runb = 0; #endif @@ -229,13 +229,13 @@ ntfs_getattr(ap) dprintf(("ntfs_getattr: %d, flags: %d\n",ip->i_number,ip->i_flag)); - vap->va_fsid = fp->f_dev; + vap->va_fsid = dev2udev(fp->f_dev); vap->va_fileid = ip->i_number; vap->va_mode = ip->i_mode; vap->va_nlink = ip->i_nlink; vap->va_uid = ip->i_uid; vap->va_gid = ip->i_gid; - vap->va_rdev = (dev_t)0; + vap->va_rdev = 0; /* XXX UNODEV ? */ vap->va_size = fp->f_size; vap->va_bytes = fp->f_allocated; vap->va_atime = ntfs_nttimetounix(fp->f_times.t_access); @@ -270,28 +270,16 @@ ntfs_inactive(ap) error = 0; -#if __FreeBSD_version >= 300000 || defined(__NetBSD__) VOP__UNLOCK(vp,0,ap->a_p); -#else -#ifdef DIAGNOSTIC - if (VOP_ISLOCKED(vp)) - panic("ntfs_inactive: locked vnode"); - if (curproc) - ip->i_lockholder = curproc->p_pid; - else - ip->i_lockholder = -1; -#endif - ip->i_flag |= IN_LOCKED; - VOP__UNLOCK(vp); -#endif + /* * If we are done with the ntnode, reclaim it * so that it can be reused immediately. */ if (vp->v_usecount == 0 && ip->i_mode == 0) -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) vrecycle(vp, (struct simplelock *)0, ap->a_p); -#else +#else /* defined(__NetBSD__) */ vgone(vp); #endif return (error); @@ -317,7 +305,7 @@ ntfs_reclaim(ap) if (error) return (error); -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) VOP__UNLOCK(vp,0,ap->a_p); #endif @@ -481,7 +469,7 @@ ntfs_write(ap) return (0); } -#if (__FreeBSD_version < 300000) && (__NetBSD_Version__ < 104040000) +#if defined(__NetBSD__) /* * Check for a locked ntnode. */ @@ -745,10 +733,6 @@ ntfs_close(ap) return (0); } -/* -#undef dprintf -#define dprintf(a) printf a -*/ int ntfs_readdir(ap) struct vop_readdir_args /* { @@ -851,15 +835,12 @@ ntfs_readdir(ap) if (!error && ap->a_ncookies != NULL) { struct dirent* dpStart; struct dirent* dp; -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) u_long *cookies; u_long *cookiep; -#elif defined(__NetBSD__) +#else /* defined(__NetBSD__) */ off_t *cookies; off_t *cookiep; -#else - u_int *cookies; - u_int *cookiep; #endif printf("ntfs_readdir: %d cookies\n",ncookies); @@ -868,10 +849,10 @@ ntfs_readdir(ap) dpStart = (struct dirent *) ((caddr_t)uio->uio_iov->iov_base - (uio->uio_offset - off)); -#if __FreeBSD_version >= 300000 +#if defined(__FreeBSD__) MALLOC(cookies, u_long *, ncookies * sizeof(u_long), M_TEMP, M_WAITOK); -#elif defined(__NetBSD__) +#else /* defined(__NetBSD__) */ MALLOC(cookies, off_t *, ncookies * sizeof(off_t), M_TEMP, M_WAITOK); #else @@ -893,10 +874,6 @@ ntfs_readdir(ap) */ return (error); } -/* -#undef dprintf -#define dprintf(a) -*/ int ntfs_lookup(ap) @@ -944,11 +921,7 @@ ntfs_lookup(ap) if(error) return (error); -#if __FreeBSD_version >= 300000 || defined(__NetBSD__) VOP__UNLOCK(dvp,0,cnp->cn_proc); -#else - VOP_UNLOCK(dvp); -#endif dprintf(("ntfs_lookup: parentdir: %d\n", vap->va_a_name->n_pnumber)); @@ -956,20 +929,12 @@ ntfs_lookup(ap) vap->va_a_name->n_pnumber,ap->a_vpp); ntfs_ntvattrrele(vap); if(error) { -#if __FreeBSD_version >= 300000 || defined(__NetBSD__) VOP__LOCK(dvp, 0, cnp->cn_proc); -#else - VOP_LOCK(dvp); -#endif return(error); } if( lockparent && (cnp->cn_flags & ISLASTCN) && -#if __FreeBSD_version >= 300000 || defined(__NetBSD__) (error = VOP__LOCK(dvp, 0, cnp->cn_proc)) ) { -#else - (error = VOP_LOCK(dvp)) ) { -#endif vput( *(ap->a_vpp) ); return (error); } @@ -983,11 +948,7 @@ ntfs_lookup(ap) VTONT(*ap->a_vpp)->i_number)); if(!lockparent || !(cnp->cn_flags & ISLASTCN)) -#if __FreeBSD_version >= 300000 || defined(__NetBSD__) VOP__UNLOCK(dvp, 0, cnp->cn_proc); -#else - VOP_UNLOCK(dvp); -#endif if (cnp->cn_flags & MAKEENTRY) cache_enter(dvp, *ap->a_vpp, cnp); @@ -1017,7 +978,7 @@ ntfs_fsync(ap) * Global vfs data structures */ vop_t **ntfs_vnodeop_p; -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) static #endif struct vnodeopv_entry_desc ntfs_vnodeop_entries[] = { @@ -1028,7 +989,7 @@ struct vnodeopv_entry_desc ntfs_vnodeop_entries[] = { { &vop_reclaim_desc, (vop_t *)ntfs_reclaim }, { &vop_print_desc, (vop_t *)ntfs_print }, -#if __FreeBSD_version >= 30000 +#if defined(__FreeBSD__) { &vop_islocked_desc, (vop_t *)vop_stdislocked }, { &vop_unlock_desc, (vop_t *)vop_stdunlock }, { &vop_lock_desc, (vop_t *)vop_stdlock }, @@ -1055,14 +1016,14 @@ struct vnodeopv_entry_desc ntfs_vnodeop_entries[] = { { &vop_fsync_desc, (vop_t *)ntfs_fsync }, { &vop_bmap_desc, (vop_t *)ntfs_bmap }, -#ifndef __NetBSD__ - { &vop_getpages_desc, (vop_t *)ntfs_getpages }, +#if defined(__FreeBSD__) + { &vop_getpages_desc, (vop_t *) ntfs_getpages }, { &vop_putpages_desc, (vop_t *) ntfs_putpages }, #endif { &vop_strategy_desc, (vop_t *)ntfs_strategy }, -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) { &vop_bwrite_desc, (vop_t *)vop_stdbwrite }, -#else +#else /* defined(__NetBSD__) */ { &vop_bwrite_desc, (vop_t *)vn_bwrite }, #endif { &vop_read_desc, (vop_t *)ntfs_read }, @@ -1071,12 +1032,12 @@ struct vnodeopv_entry_desc ntfs_vnodeop_entries[] = { { NULL, NULL } }; -#ifndef __NetBSD__ +#if defined(__FreeBSD__) static #endif struct vnodeopv_desc ntfs_vnodeop_opv_desc = { &ntfs_vnodeop_p, ntfs_vnodeop_entries }; -#ifndef __NetBSD__ +#if defined(__FreeBSD__) VNODEOP_SET(ntfs_vnodeop_opv_desc); #endif diff --git a/sys/ntfs/ntfsmount.h b/sys/ntfs/ntfsmount.h index 0d3957cb6dee..337a805430b9 100644 --- a/sys/ntfs/ntfsmount.h +++ b/sys/ntfs/ntfsmount.h @@ -1,4 +1,4 @@ -/* $NetBSD: ntfsmount.h,v 1.2 1999/05/06 15:43:21 christos Exp $ */ +/* $NetBSD: ntfsmount.h,v 1.3 1999/07/26 14:02:32 jdolecek Exp $ */ /*- * Copyright (c) 1998, 1999 Semen Ustimenko @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Id: ntfsmount.h,v 1.3 1999/04/20 21:06:44 semenu Exp + * Id: ntfsmount.h,v 1.4 1999/05/12 09:43:09 semenu Exp */ #define NTFS_MFLAG_CASEINS 0x00000001