diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-11-14 23:37:34 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-11-14 23:37:34 +0000 |
commit | 4af8619bce0e7a890a07cae5e55d84eb8add77df (patch) | |
tree | adbfb668578f153528d21b39b50a373c0bcc163c /sys/nfs/krpc_subr.c | |
parent | 3036624aed4efedc388713838b3c2717594f62f3 (diff) |
allow swaples diskless configs; deradt@ ok
Diffstat (limited to 'sys/nfs/krpc_subr.c')
-rw-r--r-- | sys/nfs/krpc_subr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/nfs/krpc_subr.c b/sys/nfs/krpc_subr.c index d4961adc636..64e04506828 100644 --- a/sys/nfs/krpc_subr.c +++ b/sys/nfs/krpc_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: krpc_subr.c,v 1.11 2001/06/27 05:45:00 nate Exp $ */ +/* $OpenBSD: krpc_subr.c,v 1.12 2001/11/14 23:37:33 mickey Exp $ */ /* $NetBSD: krpc_subr.c,v 1.12.4.1 1996/06/07 00:52:26 cgd Exp $ */ /* @@ -164,7 +164,7 @@ krpc_portmap(sin, prog, vers, portp) sin->sin_port = htons(PMAPPORT); error = krpc_call(sin, PMAPPROG, PMAPVERS, - PMAPPROC_GETPORT, &m, NULL); + PMAPPROC_GETPORT, &m, NULL, -1); if (error) return error; @@ -186,11 +186,12 @@ krpc_portmap(sin, prog, vers, portp) * the address from whence the response came is saved there. */ int -krpc_call(sa, prog, vers, func, data, from_p) +krpc_call(sa, prog, vers, func, data, from_p, retries) struct sockaddr_in *sa; u_int prog, vers, func; struct mbuf **data; /* input/output */ struct mbuf **from_p; /* output */ + int retries; { struct socket *so; struct sockaddr_in *sin; @@ -330,8 +331,7 @@ krpc_call(sa, prog, vers, func, data, from_p) * but delay each re-send by an increasing amount. * If the delay hits the maximum, start complaining. */ - timo = 0; - for (;;) { + for (timo = 0; retries; retries--) { /* Send RPC request (or re-send). */ m = m_copym(mhead, 0, M_COPYALL, M_WAIT); if (m == NULL) { |