unifdef -U__NetBSD__ -D__FreeBSD__
This commit is contained in:
parent
375bbf8b88
commit
07b2d0aaa3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=29288
@ -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.
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
|
||||
* $Id: nfs_bio.c,v 1.42 1997/06/25 08:35:41 dfr Exp $
|
||||
* $Id: nfs_bio.c,v 1.43 1997/08/02 14:33:06 bde Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -1094,11 +1094,7 @@ nfs_doio(bp, cr, p)
|
||||
np->n_mtime != np->n_vattr.va_mtime.tv_sec))) {
|
||||
uprintf("Process killed due to text file modification\n");
|
||||
psignal(p, SIGKILL);
|
||||
#ifdef __NetBSD__
|
||||
p->p_holdcnt++;
|
||||
#else
|
||||
p->p_flag |= P_NOSWAP;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case VLNK:
|
||||
|
@ -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.
|
||||
@ -1187,7 +1186,6 @@ nfs_init(vfsp)
|
||||
sysent[SYS_getfh].sy_narg = 2;
|
||||
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--;
|
||||
}
|
||||
|
@ -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 @@ nfsrv_readdir(nfsd, slp, procp, mrq)
|
||||
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 @@ nfsrv_readdir(nfsd, slp, procp, mrq)
|
||||
*/
|
||||
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 @@ nfsrv_readdirplus(nfsd, slp, procp, mrq)
|
||||
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 @@ nfsrv_readdirplus(nfsd, slp, procp, mrq)
|
||||
*/
|
||||
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++;
|
||||
|
@ -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.
|
||||
@ -1187,7 +1186,6 @@ nfs_init(vfsp)
|
||||
sysent[SYS_getfh].sy_narg = 2;
|
||||
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--;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95
|
||||
* $Id: nfs_vfsops.c,v 1.46 1997/09/02 01:19:41 bde Exp $
|
||||
* $Id: nfs_vfsops.c,v 1.47 1997/09/07 12:56:44 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -275,15 +275,7 @@ nfs_statfs(mp, sbp, p)
|
||||
} else
|
||||
goto nfsmout;
|
||||
|
||||
#ifdef __NetBSD__
|
||||
#ifdef COMPAT_09
|
||||
sbp->f_type = 2;
|
||||
#else
|
||||
sbp->f_type = 0;
|
||||
#endif
|
||||
#else
|
||||
sbp->f_type = MOUNT_NFS;
|
||||
#endif
|
||||
sbp->f_flags = nmp->nm_flag;
|
||||
sbp->f_iosize = nfs_iosize(nmp);
|
||||
if (v3) {
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95
|
||||
* $Id: nfs_vnops.c,v 1.55 1997/06/25 08:32:33 dfr Exp $
|
||||
* $Id: nfs_vnops.c,v 1.56 1997/08/26 07:32:43 phk Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -190,9 +190,7 @@ static struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = {
|
||||
};
|
||||
static struct vnodeopv_desc nfsv2_vnodeop_opv_desc =
|
||||
{ &nfsv2_vnodeop_p, nfsv2_vnodeop_entries };
|
||||
#ifdef __FreeBSD__
|
||||
VNODEOP_SET(nfsv2_vnodeop_opv_desc);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Special device vnode ops
|
||||
@ -247,9 +245,7 @@ static struct vnodeopv_entry_desc spec_nfsv2nodeop_entries[] = {
|
||||
};
|
||||
static struct vnodeopv_desc spec_nfsv2nodeop_opv_desc =
|
||||
{ &spec_nfsv2nodeop_p, spec_nfsv2nodeop_entries };
|
||||
#ifdef __FreeBSD__
|
||||
VNODEOP_SET(spec_nfsv2nodeop_opv_desc);
|
||||
#endif
|
||||
|
||||
vop_t **fifo_nfsv2nodeop_p;
|
||||
static struct vnodeopv_entry_desc fifo_nfsv2nodeop_entries[] = {
|
||||
@ -301,9 +297,7 @@ static struct vnodeopv_entry_desc fifo_nfsv2nodeop_entries[] = {
|
||||
};
|
||||
static struct vnodeopv_desc fifo_nfsv2nodeop_opv_desc =
|
||||
{ &fifo_nfsv2nodeop_p, fifo_nfsv2nodeop_entries };
|
||||
#ifdef __FreeBSD__
|
||||
VNODEOP_SET(fifo_nfsv2nodeop_opv_desc);
|
||||
#endif
|
||||
|
||||
static int nfs_commit __P((struct vnode *vp, u_quad_t offset, int cnt,
|
||||
struct ucred *cred, struct proc *procp));
|
||||
@ -3003,7 +2997,6 @@ nfs_advlock(ap)
|
||||
int a_flags;
|
||||
} */ *ap;
|
||||
{
|
||||
#ifdef __FreeBSD__
|
||||
register struct nfsnode *np = VTONFS(ap->a_vp);
|
||||
|
||||
/*
|
||||
@ -3012,9 +3005,6 @@ nfs_advlock(ap)
|
||||
* that this is a local lock.
|
||||
*/
|
||||
return (lf_advlock(ap, &(np->n_lockf), np->n_size));
|
||||
#else
|
||||
return (EOPNOTSUPP);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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.
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
|
||||
* $Id: nfs_bio.c,v 1.42 1997/06/25 08:35:41 dfr Exp $
|
||||
* $Id: nfs_bio.c,v 1.43 1997/08/02 14:33:06 bde Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -1094,11 +1094,7 @@ nfs_doio(bp, cr, p)
|
||||
np->n_mtime != np->n_vattr.va_mtime.tv_sec))) {
|
||||
uprintf("Process killed due to text file modification\n");
|
||||
psignal(p, SIGKILL);
|
||||
#ifdef __NetBSD__
|
||||
p->p_holdcnt++;
|
||||
#else
|
||||
p->p_flag |= P_NOSWAP;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case VLNK:
|
||||
|
@ -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.
|
||||
@ -1187,7 +1186,6 @@ nfs_init(vfsp)
|
||||
sysent[SYS_getfh].sy_narg = 2;
|
||||
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--;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95
|
||||
* $Id: nfs_vfsops.c,v 1.46 1997/09/02 01:19:41 bde Exp $
|
||||
* $Id: nfs_vfsops.c,v 1.47 1997/09/07 12:56:44 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -275,15 +275,7 @@ nfs_statfs(mp, sbp, p)
|
||||
} else
|
||||
goto nfsmout;
|
||||
|
||||
#ifdef __NetBSD__
|
||||
#ifdef COMPAT_09
|
||||
sbp->f_type = 2;
|
||||
#else
|
||||
sbp->f_type = 0;
|
||||
#endif
|
||||
#else
|
||||
sbp->f_type = MOUNT_NFS;
|
||||
#endif
|
||||
sbp->f_flags = nmp->nm_flag;
|
||||
sbp->f_iosize = nfs_iosize(nmp);
|
||||
if (v3) {
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95
|
||||
* $Id: nfs_vnops.c,v 1.55 1997/06/25 08:32:33 dfr Exp $
|
||||
* $Id: nfs_vnops.c,v 1.56 1997/08/26 07:32:43 phk Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -190,9 +190,7 @@ static struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = {
|
||||
};
|
||||
static struct vnodeopv_desc nfsv2_vnodeop_opv_desc =
|
||||
{ &nfsv2_vnodeop_p, nfsv2_vnodeop_entries };
|
||||
#ifdef __FreeBSD__
|
||||
VNODEOP_SET(nfsv2_vnodeop_opv_desc);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Special device vnode ops
|
||||
@ -247,9 +245,7 @@ static struct vnodeopv_entry_desc spec_nfsv2nodeop_entries[] = {
|
||||
};
|
||||
static struct vnodeopv_desc spec_nfsv2nodeop_opv_desc =
|
||||
{ &spec_nfsv2nodeop_p, spec_nfsv2nodeop_entries };
|
||||
#ifdef __FreeBSD__
|
||||
VNODEOP_SET(spec_nfsv2nodeop_opv_desc);
|
||||
#endif
|
||||
|
||||
vop_t **fifo_nfsv2nodeop_p;
|
||||
static struct vnodeopv_entry_desc fifo_nfsv2nodeop_entries[] = {
|
||||
@ -301,9 +297,7 @@ static struct vnodeopv_entry_desc fifo_nfsv2nodeop_entries[] = {
|
||||
};
|
||||
static struct vnodeopv_desc fifo_nfsv2nodeop_opv_desc =
|
||||
{ &fifo_nfsv2nodeop_p, fifo_nfsv2nodeop_entries };
|
||||
#ifdef __FreeBSD__
|
||||
VNODEOP_SET(fifo_nfsv2nodeop_opv_desc);
|
||||
#endif
|
||||
|
||||
static int nfs_commit __P((struct vnode *vp, u_quad_t offset, int cnt,
|
||||
struct ucred *cred, struct proc *procp));
|
||||
@ -3003,7 +2997,6 @@ nfs_advlock(ap)
|
||||
int a_flags;
|
||||
} */ *ap;
|
||||
{
|
||||
#ifdef __FreeBSD__
|
||||
register struct nfsnode *np = VTONFS(ap->a_vp);
|
||||
|
||||
/*
|
||||
@ -3012,9 +3005,6 @@ nfs_advlock(ap)
|
||||
* that this is a local lock.
|
||||
*/
|
||||
return (lf_advlock(ap, &(np->n_lockf), np->n_size));
|
||||
#else
|
||||
return (EOPNOTSUPP);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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 @@ nfsrv_readdir(nfsd, slp, procp, mrq)
|
||||
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 @@ nfsrv_readdir(nfsd, slp, procp, mrq)
|
||||
*/
|
||||
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 @@ nfsrv_readdirplus(nfsd, slp, procp, mrq)
|
||||
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 @@ nfsrv_readdirplus(nfsd, slp, procp, mrq)
|
||||
*/
|
||||
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++;
|
||||
|
@ -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.
|
||||
@ -1187,7 +1186,6 @@ nfs_init(vfsp)
|
||||
sysent[SYS_getfh].sy_narg = 2;
|
||||
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--;
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user