+/* $OpenBSD: krpc.h,v 1.3 1996/04/17 04:50:21 mickey Exp $ */
/* $NetBSD: krpc.h,v 1.4 1995/12/19 23:07:11 cgd Exp $ */
#include <sys/cdefs.h>
+/* $OpenBSD: krpc_subr.c,v 1.3 1996/04/17 04:50:22 mickey Exp $ */
/* $NetBSD: krpc_subr.c,v 1.11 1995/12/19 23:07:19 cgd Exp $ */
/*
+/* $OpenBSD: nfs.h,v 1.4 1996/04/17 04:50:23 mickey Exp $ */
/* $NetBSD: nfs.h,v 1.10 1996/02/18 11:53:38 fvdl Exp $ */
+
/*
* Copyright (c) 1989, 1993, 1995
* The Regents of the University of California. All rights reserved.
-/* $OpenBSD: nfs_bio.c,v 1.4 1996/03/31 13:15:32 mickey Exp $ */
+/* $OpenBSD: nfs_bio.c,v 1.5 1996/04/17 04:50:24 mickey Exp $ */
/* $NetBSD: nfs_bio.c,v 1.25 1996/02/29 20:26:16 fvdl Exp $ */
/*
vp->v_type);
};
}
- baddr = (caddr_t)0;
+ baddr = NULL;
switch (vp->v_type) {
case VREG:
nfsstats.biocache_reads++;
}
} else if ((n + on) == biosize &&
(nmp->nm_flag & NFSMNT_NQNFS) == 0) {
- bp->b_proc = (struct proc *)0;
+ bp->b_proc = (struct proc *)NULL;
bp->b_flags |= B_ASYNC;
(void)nfs_writebp(bp, 0);
} else {
if (nmp->nm_flag & NFSMNT_INT) {
bp = getblk(vp, bn, size, PCATCH, 0);
- while (bp == (struct buf *)0) {
- if (nfs_sigintr(nmp, (struct nfsreq *)0, p))
- return ((struct buf *)0);
+ while (bp == NULL) {
+ if (nfs_sigintr(nmp, (struct nfsreq *)NULL, p))
+ return ((struct buf *)NULL);
bp = getblk(vp, bn, size, 0, 2 * hz);
}
} else
np->n_flag |= NFLUSHWANT;
error = tsleep((caddr_t)&np->n_flag, PRIBIO + 2, "nfsvinval",
slptimeo);
- if (error && intrflg && nfs_sigintr(nmp, (struct nfsreq *)0, p))
+ if (error && intrflg && nfs_sigintr(nmp, (struct nfsreq *)NULL, p))
return (EINTR);
}
np->n_flag |= NFLUSHINPROG;
error = vinvalbuf(vp, flags, cred, p, slpflag, 0);
while (error) {
- if (intrflg && nfs_sigintr(nmp, (struct nfsreq *)0, p)) {
+ if (intrflg && nfs_sigintr(nmp, (struct nfsreq *)NULL, p)) {
np->n_flag &= ~NFLUSHINPROG;
if (np->n_flag & NFLUSHWANT) {
np->n_flag &= ~NFLUSHWANT;
}
TAILQ_INSERT_TAIL(&nfs_bufq, bp, b_freelist);
- nfs_iodwant[i] = (struct proc *)0;
+ nfs_iodwant[i] = (struct proc *)NULL;
wakeup((caddr_t)&nfs_iodwant[i]);
return (0);
}
}
break;
case VLNK:
- uiop->uio_offset = (off_t)0;
+ uiop->uio_offset = (off_t)NULL;
nfsstats.readlink_bios++;
error = nfs_readlinkrpc(vp, uiop, cr);
break;
-/* $OpenBSD: nfs_node.c,v 1.4 1996/03/31 13:15:36 mickey Exp $ */
+/* $OpenBSD: nfs_node.c,v 1.5 1996/04/17 04:50:25 mickey Exp $ */
/* $NetBSD: nfs_node.c,v 1.16 1996/02/18 11:53:42 fvdl Exp $ */
/*
if (ap->a_vp->v_type != VDIR)
sp = np->n_sillyrename;
else
- sp = (struct sillyrename *)0;
- np->n_sillyrename = (struct sillyrename *)0;
+ sp = NULL;
+ np->n_sillyrename = NULL;
if (sp) {
/*
* Remove the silly file that was rename'd earlier
cache_purge(vp);
FREE(vp->v_data, M_NFSNODE);
- vp->v_data = (void *)0;
+ vp->v_data = NULL;
return (0);
}
-/* $OpenBSD: nfs_nqlease.c,v 1.4 1996/03/31 13:15:38 mickey Exp $ */
+/* $OpenBSD: nfs_nqlease.c,v 1.5 1996/04/17 04:50:26 mickey Exp $ */
/* $NetBSD: nfs_nqlease.c,v 1.14 1996/02/18 14:06:50 fvdl Exp $ */
/*
tlp = vp->v_lease;
if ((flags & ND_CHECK) == 0)
nfsstats.srvnqnfs_getleases++;
- if (tlp == 0) {
+ if (tlp == NULL) {
/*
* Find the lease by searching the hash list.
*/
}
} else
lp = tlp;
- if (lp != 0) {
+ if (lp != NULL) {
if ((lp->lc_flag & LC_NONCACHABLE) ||
- (lp->lc_morehosts == (struct nqm *)0 &&
+ (lp->lc_morehosts == NULL &&
nqsrv_cmpnam(slp, nam, &lp->lc_host)))
goto doreply;
if ((flags & ND_READ) && (lp->lc_flag & LC_WRITE) == 0) {
u_quad_t frev;
(void) nqsrv_getlease(ap->a_vp, &duration, ND_CHECK | ap->a_flag,
- NQLOCALSLP, ap->a_p, (struct mbuf *)0, &cache, &frev, ap->a_cred);
+ NQLOCALSLP, ap->a_p, (struct mbuf *)NULL, &cache, &frev, ap->a_cred);
return (0);
}
newexpiry = time.tv_sec + duration + nqsrv_clockskew;
if (lp->lc_expiry == newexpiry)
return;
- if (lp->lc_timer.cqe_next != 0)
+ if (lp->lc_timer.cqe_next != NULL)
CIRCLEQ_REMOVE(&nqtimerhead, lp, lc_timer);
lp->lc_expiry = newexpiry;
nam2 = lph->lph_nam;
so = nfs_cltpsock->ns_so;
} else if (lph->lph_slp->ns_flag & SLP_VALID) {
- nam2 = (struct mbuf *)0;
+ nam2 = (struct mbuf *)NULL;
so = lph->lph_slp->ns_so;
} else
goto nextone;
if (so->so_proto->pr_flags & PR_CONNREQUIRED)
solockp = &lph->lph_slp->ns_solock;
else
- solockp = (int *)0;
- nfsm_reqhead((struct vnode *)0, NQNFSPROC_EVICTED,
+ solockp = (int *)NULL;
+ nfsm_reqhead((struct vnode *)NULL, NQNFSPROC_EVICTED,
NFSX_V3FH);
nfsm_build(cp, caddr_t, NFSX_V3FH);
bzero(cp, NFSX_V3FH);
}
m = nfsm_rpchead(cred, (NFSMNT_NFSV3 | NFSMNT_NQNFS),
NQNFSPROC_EVICTED,
- RPCAUTH_UNIX, 5 * NFSX_UNSIGNED, (char *)0,
- 0, (char *)0, mreq, siz, &mheadend, &xid);
+ RPCAUTH_UNIX, 5 * NFSX_UNSIGNED, NULL,
+ 0, NULL, mreq, siz, &mheadend, &xid);
/*
* For stream protocols, prepend a Sun RPC
* Record Mark.
if (solockp)
*solockp |= NFSMNT_SNDLOCK;
(void) nfs_send(so, nam2, m,
- (struct nfsreq *)0);
+ (struct nfsreq *)NULL);
if (solockp)
nfs_sndunlock(solockp);
}
* recycled and has another valid lease reference,
* which is dereferenced prematurely.
*/
- lp->lc_vp->v_lease = (struct nqlease *)0;
+ lp->lc_vp->v_lease = (struct nqlease *)NULL;
lph = &lp->lc_host;
lphnext = lp->lc_morehosts;
- olphnext = (struct nqm *)0;
+ olphnext = (struct nqm *)NULL;
len = 1;
i = 0;
ok = 1;
if (++i == len) {
if (olphnext) {
free((caddr_t)olphnext, M_NQMHOST);
- olphnext = (struct nqm *)0;
+ olphnext = (struct nqm *)NULL;
}
if (lphnext) {
olphnext = lphnext;
caddr_t dpos = nfsd->nd_dpos;
register struct nqlease *lp;
register struct nqhost *lph;
- struct nqlease *tlp = (struct nqlease *)0;
+ struct nqlease *tlp = NULL;
nfsfh_t nfh;
fhandle_t *fhp;
register u_int32_t *tl;
tlp = lp;
break;
}
- if (tlp != 0) {
+ if (tlp != NULL) {
lp = tlp;
len = 1;
i = 0;
if (reqtime > time.tv_sec) {
fxdr_hyper(tl, &frev);
nqnfs_clientlease(nmp, np, rwflag, cachable, reqtime, frev);
- nfsm_loadattr(vp, (struct vattr *)0);
+ nfsm_loadattr(vp, (struct vattr *)NULL);
} else
error = NQNFS_EXPIRED;
nfsm_reqdone;
m = m->m_next;
}
m = nfsm_rpchead(cred, nmp->nm_flag, NQNFSPROC_VACATED,
- RPCAUTH_UNIX, 5 * NFSX_UNSIGNED, (char *)0,
- 0, (char *)0, mreq, i, &mheadend, &xid);
+ RPCAUTH_UNIX, 5 * NFSX_UNSIGNED, NULL,
+ 0, NULL, mreq, i, &mheadend, &xid);
if (nmp->nm_sotype == SOCK_STREAM) {
M_PREPEND(m, NFSX_UNSIGNED, M_WAIT);
*mtod(m, u_int32_t *) = htonl(0x80000000 | (m->m_pkthdr.len -
myrep.r_flags = 0;
myrep.r_nmp = nmp;
if (nmp->nm_soflags & PR_CONNREQUIRED)
- (void) nfs_sndlock(&nmp->nm_flag, (struct nfsreq *)0);
+ (void) nfs_sndlock(&nmp->nm_flag, (struct nfsreq *)NULL);
(void) nfs_send(nmp->nm_so, nmp->nm_nam, m, &myrep);
if (nmp->nm_soflags & PR_CONNREQUIRED)
nfs_sndunlock(&nmp->nm_flag);
struct nfssvc_sock *slp;
struct nfsrv_descript ndesc;
register struct nfsrv_descript *nfsd = &ndesc;
- struct mbuf **mrq = (struct mbuf **)0, *mb, *mreq;
+ struct mbuf **mrq = NULL, *mb, *mreq;
int error = 0, cache = 0;
char *cp2, *bpos;
u_quad_t frev;
nmp->nm_so->so_rcv.sb_cc > 0) {
myrep.r_flags = R_GETONEREP;
myrep.r_nmp = nmp;
- myrep.r_mrep = (struct mbuf *)0;
- myrep.r_procp = (struct proc *)0;
+ myrep.r_mrep = (struct mbuf *)NULL;
+ myrep.r_procp = (struct proc *)NULL;
(void) nfs_reply(&myrep);
}
-/* $OpenBSD: nfs_serv.c,v 1.4 1996/03/31 13:15:41 mickey Exp $ */
+/* $OpenBSD: nfs_serv.c,v 1.5 1996/04/17 04:50:27 mickey Exp $ */
/* $NetBSD: nfs_serv.c,v 1.25 1996/03/02 15:55:52 jtk Exp $ */
/*
(nfsd->nd_flag & ND_KERBAUTH));
if (error) {
nfsm_reply(NFSX_UNSIGNED);
- nfsm_srvpostop_attr(1, (struct vattr *)0);
+ nfsm_srvpostop_attr(1, (struct vattr *)NULL);
return (0);
}
nfsmode = fxdr_unsigned(u_int32_t, *tl);
uiop->uio_resid = len;
uiop->uio_rw = UIO_READ;
uiop->uio_segflg = UIO_SYSSPACE;
- uiop->uio_procp = (struct proc *)0;
+ uiop->uio_procp = (struct proc *)NULL;
error = nfsrv_fhtovp(fhp, 1, &vp, cred, slp, nam,
&rdonly, (nfsd->nd_flag & ND_KERBAUTH));
if (error) {
m_freem(mp3);
nfsm_reply(2 * NFSX_UNSIGNED);
- nfsm_srvpostop_attr(1, (struct vattr *)0);
+ nfsm_srvpostop_attr(1, (struct vattr *)NULL);
return (0);
}
if (vp->v_type != VLNK) {
&rdonly, (nfsd->nd_flag & ND_KERBAUTH));
if (error) {
nfsm_reply(2 * NFSX_UNSIGNED);
- nfsm_srvpostop_attr(1, (struct vattr *)0);
+ nfsm_srvpostop_attr(1, (struct vattr *)NULL);
return (0);
}
if (vp->v_type != VREG) {
uiop->uio_resid = len;
uiop->uio_rw = UIO_WRITE;
uiop->uio_segflg = UIO_SYSSPACE;
- uiop->uio_procp = (struct proc *)0;
+ uiop->uio_procp = (struct proc *)NULL;
uiop->uio_offset = off;
error = VOP_WRITE(vp, uiop, ioflags, cred);
nfsstats.srvvop_writes++;
ioflags = (IO_METASYNC | IO_SYNC | IO_NODELOCKED);
uiop->uio_rw = UIO_WRITE;
uiop->uio_segflg = UIO_SYSSPACE;
- uiop->uio_procp = (struct proc *)0;
+ uiop->uio_procp = (struct proc *)NULL;
uiop->uio_offset = nfsd->nd_off;
uiop->uio_resid = nfsd->nd_eoff - nfsd->nd_off;
if (uiop->uio_resid > 0) {
register int32_t t1;
caddr_t bpos;
int error = 0, cache, len, tsize, dirfor_ret = 1, diraft_ret = 1;
- int rdev = 0;
+ dev_t rdev = 0;
int v3 = (nfsd->nd_flag & ND_NFSV3), how, exclusive_flag = 0;
char *cp2;
struct mbuf *mb, *mb2, *mreq;
procp);
else {
vrele(dirp);
- dirp = (struct vnode *)0;
+ dirp = (struct vnode *)NULL;
}
}
if (error) {
case VCHR:
case VBLK:
case VFIFO:
- rdev = fxdr_unsigned(int32_t, sp->sa_size);
+ rdev = (dev_t)fxdr_unsigned(int32_t, sp->sa_size);
break;
default:
break;
va.va_type == VFIFO) {
if (va.va_type == VCHR && rdev == 0xffffffff)
va.va_type = VFIFO;
- error = suser(cred, (u_short *)0);
- if (error) {
+ if ((error = suser(cred, NULL)) != 0) {
vrele(nd.ni_startdir);
free(nd.ni_cnd.cn_pnbuf, M_NAMEI);
VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd);
enum vtype vtyp;
char *cp2;
struct mbuf *mb, *mb2, *mreq;
- struct vnode *vp, *dirp = (struct vnode *)0;
+ struct vnode *vp, *dirp = NULL;
nfsfh_t nfh;
fhandle_t *fhp;
u_quad_t frev;
if (!error)
FREE(nd.ni_cnd.cn_pnbuf, M_NAMEI);
} else {
- error = suser(cred, (u_short *)0);
- if (error) {
+ if ((error = suser(cred, NULL)) != 0) {
vrele(nd.ni_startdir);
free((caddr_t)nd.ni_cnd.cn_pnbuf, M_NAMEI);
VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd);
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
struct mbuf *mb, *mreq;
- struct vnode *vp, *dirp;
+ struct vnode *vp = NULL, *dirp;
struct vattr dirfor, diraft;
nfsfh_t nfh;
fhandle_t *fhp;
u_quad_t frev;
-#ifndef nolint
- vp = (struct vnode *)0;
-#endif
fhp = &nfh.fh_generic;
nfsm_srvmtofh(fhp);
nfsm_srvnamesiz(len);
if (!error) {
vp = nd.ni_vp;
if (vp->v_type == VDIR &&
- (error = suser(cred, (u_short *)0)) != 0)
+ (error = suser(cred, NULL)) != 0)
goto out;
/*
* The root of a mounted filesystem cannot be deleted.
char *cp2;
struct mbuf *mb, *mreq;
struct nameidata fromnd, tond;
- struct vnode *fvp, *tvp, *tdvp, *fdirp = (struct vnode *)0;
- struct vnode *tdirp = (struct vnode *)0;
+ struct vnode *fvp = NULL, *tvp, *tdvp, *fdirp = NULL;
+ struct vnode *tdirp = NULL;
struct vattr fdirfor, fdiraft, tdirfor, tdiraft;
nfsfh_t fnfh, tnfh;
fhandle_t *ffhp, *tfhp;
u_quad_t frev;
uid_t saved_uid;
-#ifndef nolint
- fvp = (struct vnode *)0;
-#endif
ffhp = &fnfh.fh_generic;
tfhp = &tnfh.fh_generic;
fromnd.ni_cnd.cn_nameiop = 0;
procp);
else {
vrele(fdirp);
- fdirp = (struct vnode *)0;
+ fdirp = (struct vnode *)NULL;
}
}
if (error) {
procp);
else {
vrele(tdirp);
- tdirp = (struct vnode *)0;
+ tdirp = (struct vnode *)NULL;
}
}
if (error) {
int getret = 1, v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
struct mbuf *mb, *mreq;
- struct vnode *vp, *xp, *dirp = (struct vnode *)0;
+ struct vnode *vp, *xp, *dirp = NULL;
struct vattr dirfor, diraft, at;
nfsfh_t nfh, dnfh;
fhandle_t *fhp, *dfhp;
nfsm_srvwcc_data(dirfor_ret, &dirfor, diraft_ret, &diraft);
return (0);
}
- if (vp->v_type == VDIR && (error = suser(cred, (u_short *)0)) != 0)
+ if (vp->v_type == VDIR && (error = suser(cred, NULL)) != 0)
goto out1;
nd.ni_cnd.cn_cred = cred;
nd.ni_cnd.cn_nameiop = CREATE;
procp);
else {
vrele(dirp);
- dirp = (struct vnode *)0;
+ dirp = (struct vnode *)NULL;
}
}
if (error)
int error = 0, cache, len, len2, dirfor_ret = 1, diraft_ret = 1;
int v3 = (nfsd->nd_flag & ND_NFSV3);
struct mbuf *mb, *mreq, *mb2;
- struct vnode *dirp = (struct vnode *)0;
+ struct vnode *dirp = NULL;
nfsfh_t nfh;
fhandle_t *fhp;
u_quad_t frev;
procp);
else {
vrele(dirp);
- dirp = (struct vnode *)0;
+ dirp = (struct vnode *)NULL;
}
}
if (error)
io.uio_iovcnt = 1;
io.uio_segflg = UIO_SYSSPACE;
io.uio_rw = UIO_READ;
- io.uio_procp = (struct proc *)0;
+ io.uio_procp = (struct proc *)NULL;
nfsm_mtouio(&io, len2);
if (!v3) {
nfsm_dissect(sp, struct nfsv2_sattr *, NFSX_V2SATTR);
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
struct mbuf *mb, *mb2, *mreq;
- struct vnode *vp, *dirp = (struct vnode *)0;
+ struct vnode *vp, *dirp = NULL;
nfsfh_t nfh;
fhandle_t *fhp;
u_quad_t frev;
procp);
else {
vrele(dirp);
- dirp = (struct vnode *)0;
+ dirp = (struct vnode *)NULL;
}
}
if (error) {
int v3 = (nfsd->nd_flag & ND_NFSV3);
char *cp2;
struct mbuf *mb, *mreq;
- struct vnode *vp, *dirp = (struct vnode *)0;
+ struct vnode *vp, *dirp = (struct vnode *)NULL;
struct vattr dirfor, diraft;
nfsfh_t nfh;
fhandle_t *fhp;
procp);
else {
vrele(dirp);
- dirp = (struct vnode *)0;
+ dirp = (struct vnode *)NULL;
}
}
if (error) {
io.uio_resid = fullsiz;
io.uio_segflg = UIO_SYSSPACE;
io.uio_rw = UIO_READ;
- io.uio_procp = (struct proc *)0;
+ io.uio_procp = (struct proc *)NULL;
eofflag = 0;
#ifdef Lite2_integrated
VOP_LOCK(vp, 0, procp);
io.uio_resid = fullsiz;
io.uio_segflg = UIO_SYSSPACE;
io.uio_rw = UIO_READ;
- io.uio_procp = (struct proc *)0;
+ io.uio_procp = (struct proc *)NULL;
eofflag = 0;
#ifdef Lite2_integrated
-/* $OpenBSD: nfs_socket.c,v 1.4 1996/03/31 13:15:47 mickey Exp $ */
+/* $OpenBSD: nfs_socket.c,v 1.5 1996/04/17 04:50:29 mickey Exp $ */
/* $NetBSD: nfs_socket.c,v 1.26 1996/02/25 17:47:26 fvdl Exp $ */
/*
struct mbuf *m;
u_int16_t tport;
- nmp->nm_so = (struct socket *)0;
+ nmp->nm_so = (struct socket *)NULL;
saddr = mtod(nmp->nm_nam, struct sockaddr *);
error = socreate(saddr->sa_family, &nmp->nm_so, nmp->nm_sotype,
nmp->nm_soproto);
if (nmp->nm_so) {
so = nmp->nm_so;
- nmp->nm_so = (struct socket *)0;
+ nmp->nm_so = (struct socket *)NULL;
soshutdown(so, 2);
soclose(so);
}
} else
soflags = so->so_proto->pr_flags;
if ((soflags & PR_CONNREQUIRED) || (so->so_state & SS_ISCONNECTED))
- sendnam = (struct mbuf *)0;
+ sendnam = (struct mbuf *)NULL;
else
sendnam = nam;
if (so->so_type == SOCK_SEQPACKET)
else
flags = 0;
- error = sosend(so, sendnam, (struct uio *)0, top,
- (struct mbuf *)0, flags);
+ error = sosend(so, sendnam, (struct uio *)NULL, top,
+ (struct mbuf *)NULL, flags);
if (error) {
if (rep) {
log(LOG_INFO, "nfs send error %d for server %s\n",error,
/*
* Set up arguments for soreceive()
*/
- *mp = (struct mbuf *)0;
- *aname = (struct mbuf *)0;
+ *mp = (struct mbuf *)NULL;
+ *aname = (struct mbuf *)NULL;
sotype = rep->r_nmp->nm_sotype;
/*
auio.uio_procp = p;
do {
rcvflg = MSG_WAITALL;
- error = soreceive(so, (struct mbuf **)0, &auio,
- (struct mbuf **)0, (struct mbuf **)0, &rcvflg);
+ error = soreceive(so, (struct mbuf **)NULL, &auio,
+ (struct mbuf **)NULL, (struct mbuf **)NULL, &rcvflg);
if (error == EWOULDBLOCK && rep) {
if (rep->r_flags & R_SOFTTERM)
return (EINTR);
auio.uio_resid = len;
do {
rcvflg = MSG_WAITALL;
- error = soreceive(so, (struct mbuf **)0,
- &auio, mp, (struct mbuf **)0, &rcvflg);
+ error = soreceive(so, (struct mbuf **)NULL,
+ &auio, mp, (struct mbuf **)NULL, &rcvflg);
} while (error == EWOULDBLOCK || error == EINTR ||
error == ERESTART);
if (!error && auio.uio_resid > 0) {
auio.uio_procp = p;
do {
rcvflg = 0;
- error = soreceive(so, (struct mbuf **)0,
+ error = soreceive(so, (struct mbuf **)NULL,
&auio, mp, &control, &rcvflg);
if (control)
m_freem(control);
errout:
if (error && error != EINTR && error != ERESTART) {
m_freem(*mp);
- *mp = (struct mbuf *)0;
+ *mp = (struct mbuf *)NULL;
if (error != EPIPE)
log(LOG_INFO,
"receive error %d from nfs server %s\n",
if ((so = rep->r_nmp->nm_so) == NULL)
return (EACCES);
if (so->so_state & SS_ISCONNECTED)
- getnam = (struct mbuf **)0;
+ getnam = (struct mbuf **)NULL;
else
getnam = aname;
auio.uio_resid = len = 1000000;
do {
rcvflg = 0;
error = soreceive(so, getnam, &auio, mp,
- (struct mbuf **)0, &rcvflg);
+ (struct mbuf **)NULL, &rcvflg);
if (error == EWOULDBLOCK &&
(rep->r_flags & R_SOFTTERM))
return (EINTR);
}
if (error) {
m_freem(*mp);
- *mp = (struct mbuf *)0;
+ *mp = (struct mbuf *)NULL;
}
/*
* Search for any mbufs that are not a multiple of 4 bytes long
* Get the RPC header with authorization.
*/
kerbauth:
- verf_str = auth_str = (char *)0;
+ verf_str = auth_str = (char *)NULL;
if (nmp->nm_flag & NFSMNT_KERB) {
verf_str = nickv;
verf_len = sizeof (nickv);
else if ((nmp->nm_flag & NFSMNT_KERB) && *tl++ == rpc_autherr) {
if (!failed_auth) {
failed_auth++;
- mheadend->m_next = (struct mbuf *)0;
+ mheadend->m_next = (struct mbuf *)NULL;
m_freem(mrep);
m_freem(rep->r_mreq);
goto kerbauth;
(m = m_copym(rep->r_mreq, 0, M_COPYALL, M_DONTWAIT))){
if ((nmp->nm_flag & NFSMNT_NOCONN) == 0)
error = (*so->so_proto->pr_usrreq)(so, PRU_SEND, m,
- (struct mbuf *)0, (struct mbuf *)0);
+ (struct mbuf *)NULL, (struct mbuf *)NULL);
else
error = (*so->so_proto->pr_usrreq)(so, PRU_SEND, m,
- nmp->nm_nam, (struct mbuf *)0);
+ nmp->nm_nam, (struct mbuf *)NULL);
if (error) {
if (NFSIGNORE_SOERROR(nmp->nm_soflags, error))
so->so_error = 0;
}
#endif /* NFSSERVER */
splx(s);
- timeout(nfs_timer, (void *)0, nfs_ticks);
+ timeout(nfs_timer, NULL, nfs_ticks);
}
/*
if (rep->r_nmp->nm_flag & NFSMNT_INT)
slpflag = PCATCH;
} else
- p = (struct proc *)0;
+ p = (struct proc *)NULL;
while (*flagp & NFSMNT_SNDLOCK) {
if (nfs_sigintr(rep->r_nmp, rep, p))
return (EINTR);
*/
auio.uio_resid = 1000000000;
flags = MSG_DONTWAIT;
- error = soreceive(so, &nam, &auio, &mp, (struct mbuf **)0, &flags);
- if (error || mp == (struct mbuf *)0) {
+ error = soreceive(so, &nam, &auio, &mp,
+ (struct mbuf **)NULL, &flags);
+ if (error || mp == NULL) {
if (error == EWOULDBLOCK)
slp->ns_flag |= SLP_NEEDQ;
else
auio.uio_resid = 1000000000;
flags = MSG_DONTWAIT;
error = soreceive(so, &nam, &auio, &mp,
- (struct mbuf **)0, &flags);
+ (struct mbuf **)NULL, &flags);
if (mp) {
nfs_realign(mp, 10 * NFSX_UNSIGNED);
if (nam) {
else
slp->ns_rec = m;
slp->ns_recend = m;
- m->m_nextpkt = (struct mbuf *)0;
+ m->m_nextpkt = (struct mbuf *)NULL;
}
if (error) {
if ((so->so_proto->pr_flags & PR_CONNREQUIRED)
*/
if (slp->ns_cc == slp->ns_reclen) {
recm = slp->ns_raw;
- slp->ns_raw = slp->ns_rawend = (struct mbuf *)0;
+ slp->ns_raw = slp->ns_rawend = (struct mbuf *)NULL;
slp->ns_cc = slp->ns_reclen = 0;
} else if (slp->ns_cc > slp->ns_reclen) {
len = 0;
m = slp->ns_raw;
- om = (struct mbuf *)0;
+ om = (struct mbuf *)NULL;
while (len < slp->ns_reclen) {
if ((len + m->m_len) > slp->ns_reclen) {
m2 = m_copym(m, 0, slp->ns_reclen - len,
len += m->m_len;
m = m->m_next;
recm = slp->ns_raw;
- om->m_next = (struct mbuf *)0;
+ om->m_next = (struct mbuf *)NULL;
} else {
om = m;
len += m->m_len;
else
slp->ns_rec = slp->ns_frag;
slp->ns_recend = slp->ns_frag;
- slp->ns_frag = (struct mbuf *)0;
+ slp->ns_frag = (struct mbuf *)NULL;
}
}
}
*ndp = NULL;
if ((slp->ns_flag & SLP_VALID) == 0 ||
- (m = slp->ns_rec) == (struct mbuf *)0)
+ (m = slp->ns_rec) == NULL)
return (ENOBUFS);
slp->ns_rec = m->m_nextpkt;
if (slp->ns_rec)
- m->m_nextpkt = (struct mbuf *)0;
+ m->m_nextpkt = (struct mbuf *)NULL;
else
- slp->ns_recend = (struct mbuf *)0;
+ slp->ns_recend = (struct mbuf *)NULL;
if (m->m_type == MT_SONAME) {
nam = m;
m = m->m_next;
-/* $OpenBSD: nfs_srvcache.c,v 1.3 1996/03/31 13:15:50 mickey Exp $ */
+/* $OpenBSD: nfs_srvcache.c,v 1.4 1996/04/17 04:50:30 mickey Exp $ */
/* $NetBSD: nfs_srvcache.c,v 1.12 1996/02/18 11:53:49 fvdl Exp $ */
/*
} else if (rp->rc_flag & RC_REPSTATUS) {
nfsstats.srvcache_nonidemdonehits++;
nfs_rephead(0, nd, slp, rp->rc_status,
- 0, (u_quad_t *)0, repp, &mb, &bpos);
+ 0, (u_quad_t *)NULL, repp, &mb, &bpos);
ret = RC_REPLY;
} else if (rp->rc_flag & RC_REPMBUF) {
nfsstats.srvcache_nonidemdonehits++;
-/* $OpenBSD: nfs_subs.c,v 1.5 1996/03/31 13:15:53 mickey Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.6 1996/04/17 04:50:31 mickey Exp $ */
/* $NetBSD: nfs_subs.c,v 1.26 1996/03/13 00:44:17 fvdl Exp $ */
/*
}
mb->m_next = mrest;
mreq->m_pkthdr.len = authsiz + 10 * NFSX_UNSIGNED + mrest_len;
- mreq->m_pkthdr.rcvif = (struct ifnet *)0;
+ mreq->m_pkthdr.rcvif = (struct ifnet *)NULL;
*mbp = mb;
return (mreq);
}
#ifdef NFSCLIENT
/* Ensure async daemons disabled */
for (i = 0; i < NFS_MAXASYNCDAEMON; i++)
- nfs_iodwant[i] = (struct proc *)0;
+ nfs_iodwant[i] = (struct proc *)NULL;
TAILQ_INIT(&nfs_bufq);
nfs_nhinit(); /* Init the nfsnode table */
#endif /* NFSCLIENT */
int error, rdonly;
struct componentname *cnp = &ndp->ni_cnd;
- *retdirp = (struct vnode *)0;
+ *retdirp = (struct vnode *)NULL;
MALLOC(cnp->cn_pnbuf, char *, len + 1, M_NAMEI, M_WAITOK);
/*
* Copy the name from the mbuf list to ndp->ni_pnbuf
tocp = cnp->cn_pnbuf;
md = *mdp;
rem = mtod(md, caddr_t) + md->m_len - fromcp;
+ cnp->cn_hash = 0;
for (i = 0; i < len; i++) {
while (rem == 0) {
md = md->m_next;
error = EACCES;
goto out;
}
+ cnp->cn_hash += (u_char)*fromcp;
*tocp++ = *fromcp++;
rem--;
}
* And call lookup() to do the real work
*/
cnp->cn_proc = p;
- error = lookup(ndp);
- if (error)
+ if ((error = lookup(ndp)) != 0)
goto out;
/*
* Check for encountering a symbolic link
m = mp;
for (;;) {
count += m->m_len;
- if (m->m_next == (struct mbuf *)0)
+ if (m->m_next == (struct mbuf *)NULL)
break;
m = m->m_next;
}
struct ucred *credanon;
int error, exflags;
- *vpp = (struct vnode *)0;
+ *vpp = (struct vnode *)NULL;
#ifdef Lite2_integrated
mp = vfs_getvfs(&fhp->fh_fsid);
#else
dp->ndm_eocookie = 0;
LIST_INSERT_HEAD(&np->n_cookies, dp, ndm_list);
} else
- return ((nfsuint64 *)0);
+ return ((nfsuint64 *)NULL);
}
while (pos >= NFSNUMCOOKIES) {
pos -= NFSNUMCOOKIES;
if (dp->ndm_list.le_next) {
if (!add && dp->ndm_eocookie < NFSNUMCOOKIES &&
pos >= dp->ndm_eocookie)
- return ((nfsuint64 *)0);
+ return ((nfsuint64 *)NULL);
dp = dp->ndm_list.le_next;
} else if (add) {
MALLOC(dp2, struct nfsdmap *, sizeof (struct nfsdmap),
LIST_INSERT_AFTER(dp, dp2, ndm_list);
dp = dp2;
} else
- return ((nfsuint64 *)0);
+ return ((nfsuint64 *)NULL);
}
if (pos >= dp->ndm_eocookie) {
if (add)
dp->ndm_eocookie = pos + 1;
else
- return ((nfsuint64 *)0);
+ return ((nfsuint64 *)NULL);
}
return (&dp->ndm_cookies[pos]);
}
-/* $OpenBSD: nfs_syscalls.c,v 1.4 1996/03/31 13:15:56 mickey Exp $ */
+/* $OpenBSD: nfs_syscalls.c,v 1.5 1996/04/17 04:50:33 mickey Exp $ */
/* $NetBSD: nfs_syscalls.c,v 1.19 1996/02/18 11:53:52 fvdl Exp $ */
/*
* Get the client address for connected sockets.
*/
if (nfsdarg.name == NULL || nfsdarg.namelen == 0)
- nam = (struct mbuf *)0;
+ nam = (struct mbuf *)NULL;
else {
error = sockargs(&nam, nfsdarg.name, nfsdarg.namelen,
MT_SONAME);
malloc(sizeof (struct nfsuid), M_NFSUID,
M_WAITOK);
} else
- nuidp = (struct nfsuid *)0;
+ nuidp = (struct nfsuid *)NULL;
if ((slp->ns_flag & SLP_VALID) == 0) {
if (nuidp)
free((caddr_t)nuidp, M_NFSUID);
} else {
- if (nuidp == (struct nfsuid *)0) {
+ if (nuidp == NULL) {
nuidp = slp->ns_uidlruhead.tqh_first;
LIST_REMOVE(nuidp, nu_hash);
TAILQ_REMOVE(&slp->ns_uidlruhead, nuidp,
int error, s;
so = (struct socket *)fp->f_data;
- tslp = (struct nfssvc_sock *)0;
+ tslp = (struct nfssvc_sock *)NULL;
/*
* Add it to the list, as required.
*/
writes_todo = 0;
#endif
s = splsoftnet();
- if (nfsd == (struct nfsd *)0) {
+ if (nfsd == NULL) {
nsd->nsd_nfsd = nfsd = (struct nfsd *)
malloc(sizeof (struct nfsd), M_NFSD, M_WAITOK);
bzero((caddr_t)nfsd, sizeof (struct nfsd));
*/
for (;;) {
if ((nfsd->nfsd_flag & NFSD_REQINPROG) == 0) {
- while (nfsd->nfsd_slp == (struct nfssvc_sock *)0 &&
+ while (nfsd->nfsd_slp == NULL &&
(nfsd_head_flag & NFSD_CHECKSLP) == 0) {
nfsd->nfsd_flag |= NFSD_WAITING;
nfsd_waiting++;
if (error)
goto done;
}
- if (nfsd->nfsd_slp == (struct nfssvc_sock *)0 &&
+ if (nfsd->nfsd_slp == NULL &&
(nfsd_head_flag & NFSD_CHECKSLP) != 0) {
for (slp = nfssvc_sockhead.tqh_first; slp != 0;
slp = slp->ns_chain.tqe_next) {
if (slp == 0)
nfsd_head_flag &= ~NFSD_CHECKSLP;
}
- if ((slp = nfsd->nfsd_slp) == (struct nfssvc_sock *)0)
+ if ((slp = nfsd->nfsd_slp) == NULL)
continue;
if (slp->ns_flag & SLP_VALID) {
if (slp->ns_flag & SLP_DISCONN)
else if (slp->ns_flag & SLP_NEEDQ) {
slp->ns_flag &= ~SLP_NEEDQ;
(void) nfs_sndlock(&slp->ns_solock,
- (struct nfsreq *)0);
+ NULL);
nfsrv_rcv(slp->ns_so, (caddr_t)slp,
M_WAIT);
nfs_sndunlock(&slp->ns_solock);
free((caddr_t)nd, M_NFSRVDESC);
nd = NULL;
}
- nfsd->nfsd_slp = (struct nfssvc_sock *)0;
+ nfsd->nfsd_slp = (struct nfssvc_sock *)NULL;
nfsd->nfsd_flag &= ~NFSD_REQINPROG;
nfsrv_slpderef(slp);
continue;
if (so->so_proto->pr_flags & PR_CONNREQUIRED)
solockp = &slp->ns_solock;
else
- solockp = (int *)0;
+ solockp = (int *)NULL;
if (nd) {
nd->nd_starttime = time;
if (nd->nd_nam2)
}
nfsstats.srvrpccnt[nd->nd_procnum]++;
nfsrv_updatecache(nd, TRUE, mreq);
- nd->nd_mrep = (struct mbuf *)0;
+ nd->nd_mrep = (struct mbuf *)NULL;
case RC_REPLY:
m = mreq;
siz = 0;
}
m = mreq;
m->m_pkthdr.len = siz;
- m->m_pkthdr.rcvif = (struct ifnet *)0;
+ m->m_pkthdr.rcvif = (struct ifnet *)NULL;
/*
* For stream protocols, prepend a Sun RPC
* Record Mark.
*mtod(m, u_int32_t *) = htonl(0x80000000 | siz);
}
if (solockp)
- (void) nfs_sndlock(solockp, (struct nfsreq *)0);
+ (void) nfs_sndlock(solockp, (struct nfsreq *)NULL);
if (slp->ns_flag & SLP_VALID)
error = nfs_send(so, nd->nd_nam2, m, NULL);
else {
TAILQ_REMOVE(&nfsd_head, nfsd, nfsd_chain);
splx(s);
free((caddr_t)nfsd, M_NFSD);
- nsd->nsd_nfsd = (struct nfsd *)0;
+ nsd->nsd_nfsd = (struct nfsd *)NULL;
if (--nfs_numnfsd == 0)
nfsrv_init(TRUE); /* Reinitialize everything */
return (error);
slp->ns_flag &= ~SLP_ALLFLAGS;
fp = slp->ns_fp;
if (fp) {
- slp->ns_fp = (struct file *)0;
+ slp->ns_fp = (struct file *)NULL;
so = slp->ns_so;
so->so_upcall = NULL;
soshutdown(so, 2);
- closef(fp, (struct proc *)0);
+ closef(fp, (struct proc *)NULL);
if (slp->ns_nam)
MFREE(slp->ns_nam, m);
m_freem(slp->ns_raw);
/* Take one off the front of the list */
TAILQ_REMOVE(&nfs_bufq, bp, b_freelist);
if (bp->b_flags & B_READ)
- (void) nfs_doio(bp, bp->b_rcred, (struct proc *)0);
+ (void) nfs_doio(bp, bp->b_rcred, (struct proc *)NULL);
else do {
/*
* Look for a delayed write for the same vnode, so I can do
reassignbuf(nbp, nbp->b_vp);
nbp->b_vp->v_numoutput++;
}
- (void) nfs_doio(bp, bp->b_wcred, (struct proc *)0);
+ (void) nfs_doio(bp, bp->b_wcred, (struct proc *)NULL);
} while ((bp = nbp) != NULL);
}
if (error) {
-/* $OpenBSD: nfs_vfsops.c,v 1.6 1996/03/31 13:16:00 mickey Exp $ */
+/* $OpenBSD: nfs_vfsops.c,v 1.7 1996/04/17 04:50:34 mickey Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.46 1996/03/24 23:58:10 fvdl Exp $ */
/*
struct proc *p;
{
register struct vnode *vp;
- register struct nfs_statfs *sfp;
+ register struct nfs_statfs *sfp = NULL;
register caddr_t cp;
register u_int32_t *tl;
register int32_t t1, t2;
struct nfsnode *np;
u_quad_t tquad;
-#ifndef nolint
- sfp = (struct nfs_statfs *)0;
-#endif
error = nfs_nget(mp, (nfsfh_t *)nmp->nm_fh, nmp->nm_fhsize, &np);
if (error)
return (error);
if (nmp->nm_so && adjsock) {
nfs_disconnect(nmp);
if (nmp->nm_sotype == SOCK_DGRAM)
- while (nfs_connect(nmp, (struct nfsreq *)0)) {
+ while (nfs_connect(nmp, (struct nfsreq *)NULL)) {
printf("nfs_args: retrying connect\n");
(void) tsleep((caddr_t)&lbolt,
PSOCK, "nfscon", 0);
* the first request, in case the server is not responding.
*/
if (nmp->nm_sotype == SOCK_DGRAM &&
- (error = nfs_connect(nmp, (struct nfsreq *)0)))
+ (error = nfs_connect(nmp, (struct nfsreq *)NULL)))
goto bad;
/*
-/* $OpenBSD: nfs_vnops.c,v 1.5 1996/03/31 13:16:03 mickey Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.6 1996/04/17 04:50:35 mickey Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.60 1996/03/05 05:30:09 jtk Exp $ */
/*
vap->va_mtime.tv_sec != VNOVAL || vap->va_mode != (mode_t)VNOVAL) &&
(vp->v_mount->mnt_flag & MNT_RDONLY))
return (EROFS);
+
if (vap->va_size != VNOVAL) {
switch (vp->v_type) {
case VDIR:
*/
if (vp->v_mount->mnt_flag & MNT_RDONLY)
return (EROFS);
- if (vap->va_size == 0)
- error = nfs_vinvalbuf(vp, 0,
+ error = nfs_vinvalbuf(vp,
+ ((vap->va_size == 0)? 0 : V_SAVE),
ap->a_cred, ap->a_p, 1);
- else
- error = nfs_vinvalbuf(vp, V_SAVE,
- ap->a_cred, ap->a_p, 1);
if (error)
return (error);
tsize = np->n_size;
(error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred,
ap->a_p, 1)) == EINTR)
return (error);
+
error = nfs_setattrrpc(vp, vap, ap->a_cred, ap->a_p);
if (error && vap->va_size != VNOVAL) {
np->n_size = np->n_vattr.va_size = tsize;
if (v3) {
nfsm_wcc_data(vp, wccflag);
} else
- nfsm_loadattr(vp, (struct vattr *)0);
+ nfsm_loadattr(vp, (struct vattr *)NULL);
nfsm_reqdone;
return (error);
}
nfsm_postop_attr(newvp, attrflag);
nfsm_postop_attr(dvp, attrflag);
} else
- nfsm_loadattr(newvp, (struct vattr *)0);
+ nfsm_loadattr(newvp, (struct vattr *)NULL);
*vpp = newvp;
m_freem(mrep);
cnp->cn_flags |= SAVENAME;
nfsm_postop_attr(newvp, attrflag);
nfsm_postop_attr(dvp, attrflag);
} else
- nfsm_loadattr(newvp, (struct vattr *)0);
+ nfsm_loadattr(newvp, (struct vattr *)NULL);
if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN))
cnp->cn_flags |= SAVENAME;
if ((cnp->cn_flags & MAKEENTRY) &&
nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
eof = fxdr_unsigned(int, *(tl + 1));
} else
- nfsm_loadattr(vp, (struct vattr *)0);
+ nfsm_loadattr(vp, (struct vattr *)NULL);
nfsm_strsiz(retlen, nmp->nm_rsize);
nfsm_mtouio(uiop, retlen);
m_freem(mrep);
}
}
} else
- nfsm_loadattr(vp, (struct vattr *)0);
+ nfsm_loadattr(vp, (struct vattr *)NULL);
if (wccflag)
VTONFS(vp)->n_mtime = VTONFS(vp)->n_vattr.va_mtime.tv_sec;
m_freem(mrep);
register u_int32_t *tl;
register caddr_t cp;
register int32_t t1, t2;
- struct vnode *newvp = (struct vnode *)0;
+ struct vnode *newvp = NULL;
struct nfsnode *np;
char *cp2;
caddr_t bpos, dpos;
if (!gotvp) {
if (newvp) {
vrele(newvp);
- newvp = (struct vnode *)0;
+ newvp = (struct vnode *)NULL;
}
error = nfs_lookitup(dvp, cnp->cn_nameptr,
cnp->cn_namelen, cnp->cn_cred, cnp->cn_proc, &np);
register u_int32_t *tl;
register caddr_t cp;
register int32_t t1, t2;
- struct nfsnode *np = (struct nfsnode *)0;
- struct vnode *newvp = (struct vnode *)0;
+ struct nfsnode *np = NULL;
+ struct vnode *newvp = NULL;
caddr_t bpos, dpos, cp2;
int error = 0, wccflag = NFSV3_WCCRATTR, gotvp = 0, fmode = 0;
struct mbuf *mreq, *mrep, *md, *mb, *mb2;
if (!gotvp) {
if (newvp) {
vrele(newvp);
- newvp = (struct vnode *)0;
+ newvp = (struct vnode *)NULL;
}
error = nfs_lookitup(dvp, cnp->cn_nameptr,
cnp->cn_namelen, cnp->cn_cred, cnp->cn_proc, &np);
{
return (nfs_removerpc(sp->s_dvp, sp->s_name, sp->s_namlen, sp->s_cred,
- (struct proc *)0));
+ (struct proc *)NULL));
}
/*
caddr_t bpos, dpos, cp2;
int slen, error = 0, wccflag = NFSV3_WCCRATTR, gotvp;
struct mbuf *mreq, *mrep, *md, *mb, *mb2;
- struct vnode *newvp = (struct vnode *)0;
+ struct vnode *newvp = NULL;
int v3 = NFS_ISV3(dvp);
nfsstats.rpccnt[NFSPROC_SYMLINK]++;
register caddr_t cp;
register int32_t t1, t2;
register int len;
- struct nfsnode *np = (struct nfsnode *)0;
- struct vnode *newvp = (struct vnode *)0;
+ struct nfsnode *np = NULL;
+ struct vnode *newvp = NULL;
caddr_t bpos, dpos, cp2;
int error = 0, wccflag = NFSV3_WCCRATTR;
int gotvp = 0;
if (error == EEXIST || (!error && !gotvp)) {
if (newvp) {
vrele(newvp);
- newvp = (struct vnode *)0;
+ newvp = (struct vnode *)NULL;
}
error = nfs_lookitup(dvp, cnp->cn_nameptr, len, cnp->cn_cred,
cnp->cn_proc, &np);
dpos = dpossav1;
mdsav2 = md;
md = mdsav1;
- nfsm_loadattr(newvp, (struct vattr *)0);
+ nfsm_loadattr(newvp, (struct vattr *)NULL);
dpos = dpossav2;
md = mdsav2;
dp->d_type =
/* Try lookitups until we get one that isn't there */
while (nfs_lookitup(dvp, sp->s_name, sp->s_namlen, sp->s_cred,
- cnp->cn_proc, (struct nfsnode **)0) == 0) {
+ cnp->cn_proc, (struct nfsnode **)NULL) == 0) {
sp->s_name[4]++;
if (sp->s_name[4] > 'z') {
error = EINVAL;
register u_int32_t *tl;
register caddr_t cp;
register int32_t t1, t2;
- struct vnode *newvp = (struct vnode *)0;
+ struct vnode *newvp = NULL;
struct nfsnode *np, *dnp = VTONFS(dvp);
caddr_t bpos, dpos, cp2;
int error = 0, fhlen, attrflag;
return (ENOENT);
}
} else
- nfsm_loadattr(newvp, (struct vattr *)0);
+ nfsm_loadattr(newvp, (struct vattr *)NULL);
}
nfsm_reqdone;
if (npp && *npp == NULL) {
if ((bp->b_flags & (B_PHYS|B_ASYNC)) == (B_PHYS|B_ASYNC))
panic("nfs physio/async");
if (bp->b_flags & B_ASYNC)
- p = (struct proc *)0;
+ p = (struct proc *)NULL;
else
p = curproc; /* XXX */
if (bp->b_flags & B_READ)
"nfsfsync", slptimeo);
splx(s);
if (error) {
- if (nfs_sigintr(nmp, (struct nfsreq *)0, p))
+ if (nfs_sigintr(nmp, (struct nfsreq *)NULL, p))
return (EINTR);
if (slpflag == PCATCH) {
slpflag = 0;
error = tsleep((caddr_t)&vp->v_numoutput,
slpflag | (PRIBIO + 1), "nfsfsync", slptimeo);
if (error) {
- if (nfs_sigintr(nmp, (struct nfsreq *)0, p))
+ if (nfs_sigintr(nmp, (struct nfsreq *)NULL, p))
return (EINTR);
if (slpflag == PCATCH) {
slpflag = 0;
-/* $OpenBSD: nfsdiskless.h,v 1.3 1996/03/31 13:16:07 mickey Exp $ */
+/* $OpenBSD: nfsdiskless.h,v 1.4 1996/04/17 04:50:37 mickey Exp $ */
/* $NetBSD: nfsdiskless.h,v 1.9 1996/02/18 11:54:00 fvdl Exp $ */
/*
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)nfsdiskless.h 8.1 (Berkeley) 6/10/93
+ * @(#)nfsdiskless.h 8.2 (Berkeley) 3/30/95
*/
+#ifndef _NFS_DISKLESS_H_
+#define _NFS_DISKLESS_H_
+
/*
* Structure that must be initialized for a diskless nfs client.
* This structure is used by nfs_mountroot() to set up the root and swap
int nfs_boot_init __P((struct nfs_diskless *nd, struct proc *procp));
void nfs_boot_getfh __P((struct sockaddr_in *bpsin, char *key,
struct nfs_dlmount *ndmntp));
+#endif _NFS_DISKLESS_H_
-/* $OpenBSD: nfsm_subs.h,v 1.4 1996/03/31 13:16:09 mickey Exp $ */
+/* $OpenBSD: nfsm_subs.h,v 1.5 1996/04/17 04:50:38 mickey Exp $ */
/* $NetBSD: nfsm_subs.h,v 1.10 1996/03/20 21:59:56 fvdl Exp $ */
/*
nfsm_adv(NFSX_V3FATTR); \
} \
if (f) \
- nfsm_loadattr((v), (struct vattr *)0); \
+ nfsm_loadattr((v), (struct vattr *)NULL); \
}
#define nfsm_getfh(f, s, v3) \
nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED); \
if (((f) = fxdr_unsigned(int, *tl)) != 0) { \
if ((t1 = nfs_loadattrcache(&ttvp, &md, &dpos, \
- (struct vattr *)0)) != 0) { \
+ (struct vattr *)NULL)) != 0) { \
error = t1; \
(f) = 0; \
m_freem(mrep); \
+/* $OpenBSD: nfsproto.h,v 1.2 1996/04/17 04:50:39 mickey Exp $ */
/* $NetBSD: nfsproto.h,v 1.1 1996/02/18 11:54:06 fvdl Exp $ */
/*
+/* $OpenBSD: nfsrtt.h,v 1.4 1996/04/17 04:50:39 mickey Exp $ */
/* $NetBSD: nfsrtt.h,v 1.4 1996/02/18 11:54:07 fvdl Exp $ */
/*
+/* $OpenBSD: nfsrvcache.h,v 1.4 1996/04/17 04:50:40 mickey Exp $ */
/* $NetBSD: nfsrvcache.h,v 1.10 1996/02/18 11:54:08 fvdl Exp $ */
/*
+/* $OpenBSD: nfsv2.h,v 1.3 1996/04/17 04:50:41 mickey Exp $ */
/* $NetBSD: nfsv2.h,v 1.10 1995/12/19 23:08:15 cgd Exp $ */
/*
+/* $OpenBSD: nqnfs.h,v 1.4 1996/04/17 04:50:42 mickey Exp $ */
/* $NetBSD: nqnfs.h,v 1.6 1996/02/18 11:54:10 fvdl Exp $ */
/*
+/* $OpenBSD: rpcv2.h,v 1.4 1996/04/17 04:50:42 mickey Exp $ */
/* $NetBSD: rpcv2.h,v 1.8 1996/02/18 11:54:11 fvdl Exp $ */
/*
+/* $OpenBSD: swapnfs.c,v 1.2 1996/04/17 04:50:43 mickey Exp $ */
/* $NetBSD: swapnfs.c,v 1.9 1995/04/30 07:03:13 cgd Exp $ */
/*