diff options
author | phk <phk@FreeBSD.org> | 1997-09-10 19:52:27 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-09-10 19:52:27 +0000 |
commit | 4d0f72e0e25cb52d81ff2dfec572ad57269f7255 (patch) | |
tree | 60645a256c28dd6f2dfb473b58187fa055860e05 /sys/nfsserver | |
parent | 8e20f7ec0eb58e4adf6aaa2f3a9ca01a9bce42c4 (diff) | |
download | FreeBSD-src-4d0f72e0e25cb52d81ff2dfec572ad57269f7255.zip FreeBSD-src-4d0f72e0e25cb52d81ff2dfec572ad57269f7255.tar.gz |
unifdef -U__NetBSD__ -D__FreeBSD__
Diffstat (limited to 'sys/nfsserver')
-rw-r--r-- | sys/nfsserver/nfs.h | 6 | ||||
-rw-r--r-- | sys/nfsserver/nfs_serv.c | 20 | ||||
-rw-r--r-- | sys/nfsserver/nfs_srvsubs.c | 10 | ||||
-rw-r--r-- | sys/nfsserver/nfsrvstats.h | 6 |
4 files changed, 4 insertions, 38 deletions
diff --git a/sys/nfsserver/nfs.h b/sys/nfsserver/nfs.h index e1a4755..8fa52f3 100644 --- a/sys/nfsserver/nfs.h +++ b/sys/nfsserver/nfs.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.29 1997/07/16 09:06:27 dfr Exp $ + * $Id: nfs.h,v 1.30 1997/08/16 19:15:54 wollman Exp $ */ #ifndef _NFS_NFS_H_ @@ -93,11 +93,7 @@ * The B_INVAFTERWRITE flag should be set to whatever is required by the * buffer cache code to say "Invalidate the block after it is written back". */ -#ifdef __FreeBSD__ #define B_INVAFTERWRITE B_NOCACHE -#else -#define B_INVAFTERWRITE B_INVAL -#endif /* * The IO_METASYNC flag should be implemented for local file systems. diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c index 30d9128..66d6467 100644 --- a/sys/nfsserver/nfs_serv.c +++ b/sys/nfsserver/nfs_serv.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94 - * $Id: nfs_serv.c,v 1.47 1997/08/16 19:15:56 wollman Exp $ + * $Id: nfs_serv.c,v 1.48 1997/09/02 01:19:33 bde Exp $ */ /* @@ -2594,11 +2594,6 @@ nfsrv_readdir(nfsd, slp, procp, mrq) } VOP_UNLOCK(vp, 0, procp); MALLOC(rbuf, caddr_t, siz, M_TEMP, M_WAITOK); -#ifdef __NetBSD__ - ncookies = siz / (5 * NFSX_UNSIGNED); /*7 for V3, but it's an est. so*/ - MALLOC(cookies, u_long *, ncookies * sizeof (u_long *), M_TEMP, - M_WAITOK); -#endif again: iv.iov_base = rbuf; iv.iov_len = fullsiz; @@ -2668,7 +2663,6 @@ again: cend = rbuf + siz; dp = (struct dirent *)cpos; cookiep = cookies; -#ifdef __FreeBSD__ /* * For some reason FreeBSD's ufs_readdir() chooses to back the * directory offset up to a block boundary, so it is necessary to @@ -2678,9 +2672,6 @@ again: */ while (cpos < cend && ncookies > 0 && (dp->d_fileno == 0 || ((u_quad_t)(*cookiep)) <= toff)) { -#else - while (dp->d_fileno == 0 && cpos < cend && ncookies > 0) { -#endif cpos += dp->d_reclen; dp = (struct dirent *)cpos; cookiep++; @@ -2857,11 +2848,6 @@ nfsrv_readdirplus(nfsd, slp, procp, mrq) } VOP_UNLOCK(vp, 0, procp); MALLOC(rbuf, caddr_t, siz, M_TEMP, M_WAITOK); -#ifdef __NetBSD__ - ncookies = siz / (7 * NFSX_UNSIGNED); - MALLOC(cookies, u_long *, ncookies * sizeof (u_long *), M_TEMP, - M_WAITOK); -#endif again: iv.iov_base = rbuf; iv.iov_len = fullsiz; @@ -2926,7 +2912,6 @@ again: cend = rbuf + siz; dp = (struct dirent *)cpos; cookiep = cookies; -#ifdef __FreeBSD__ /* * For some reason FreeBSD's ufs_readdir() chooses to back the * directory offset up to a block boundary, so it is necessary to @@ -2936,9 +2921,6 @@ again: */ while (cpos < cend && ncookies > 0 && (dp->d_fileno == 0 || ((u_quad_t)(*cookiep)) <= toff)) { -#else - while (dp->d_fileno == 0 && cpos < cend && ncookies > 0) { -#endif cpos += dp->d_reclen; dp = (struct dirent *)cpos; cookiep++; diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c index 69baccb..e7b5340 100644 --- a/sys/nfsserver/nfs_srvsubs.c +++ b/sys/nfsserver/nfs_srvsubs.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94 - * $Id: nfs_subs.c,v 1.40 1997/07/22 15:35:57 dfr Exp $ + * $Id: nfs_subs.c,v 1.41 1997/08/16 19:15:59 wollman Exp $ */ /* @@ -1170,7 +1170,6 @@ nfs_init(vfsp) nfs_timer(0); -#ifdef __FreeBSD__ /* * Set up lease_check and lease_updatetime so that other parts * of the system can call us, if we are loadable. @@ -1188,7 +1187,6 @@ nfs_init(vfsp) sysent[SYS_getfh].sy_call = getfh; #endif #endif -#endif return (0); } @@ -1455,10 +1453,7 @@ nfs_namei(ndp, fhp, len, slp, nam, mdp, dposp, retdirp, p, kerbflag, pubflag) tocp = cnp->cn_pnbuf; md = *mdp; rem = mtod(md, caddr_t) + md->m_len - fromcp; -#ifdef __FreeBSD__ - /* XXX why is this in FreeBSD but not in NetBSD? */ cnp->cn_hash = 0; -#endif for (i = 0; i < len; i++) { while (rem == 0) { md = md->m_next; @@ -1473,10 +1468,7 @@ nfs_namei(ndp, fhp, len, slp, nam, mdp, dposp, retdirp, p, kerbflag, pubflag) error = EACCES; goto out; } -#ifdef __FreeBSD__ - /* XXX why is this in FreeBSD but not in NetBSD? */ cnp->cn_hash += (unsigned char)*fromcp; -#endif *tocp++ = *fromcp++; rem--; } diff --git a/sys/nfsserver/nfsrvstats.h b/sys/nfsserver/nfsrvstats.h index e1a4755..8fa52f3 100644 --- a/sys/nfsserver/nfsrvstats.h +++ b/sys/nfsserver/nfsrvstats.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.29 1997/07/16 09:06:27 dfr Exp $ + * $Id: nfs.h,v 1.30 1997/08/16 19:15:54 wollman Exp $ */ #ifndef _NFS_NFS_H_ @@ -93,11 +93,7 @@ * The B_INVAFTERWRITE flag should be set to whatever is required by the * buffer cache code to say "Invalidate the block after it is written back". */ -#ifdef __FreeBSD__ #define B_INVAFTERWRITE B_NOCACHE -#else -#define B_INVAFTERWRITE B_INVAL -#endif /* * The IO_METASYNC flag should be implemented for local file systems. |