Some fixes found using gcc -Wall:

nfsm_rpchead() has been called with the wrong number of args and misplaced
args since someone added new args in the middle for nfsv3.

Here's another one that would be important on 64-bit systems.  VOP_READDIR
takes a `u_int **cookies' arg.

Submitted by:	Bruce Evans <bde@zeta.org.au>
This commit is contained in:
Doug Rabson 1995-08-24 10:45:16 +00:00
parent c0e5de7d88
commit c3b2cc769c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10222
7 changed files with 41 additions and 17 deletions

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfsm_subs.h 8.1 (Berkeley) 6/16/93
* $Id: nfsm_subs.h,v 1.6 1995/05/30 08:12:51 rgrimes Exp $
* $Id: nfsm_subs.h,v 1.7 1995/06/27 11:06:55 dfr Exp $
*/
#ifndef _NFS_NFSM_SUBS_H_
@ -50,7 +50,13 @@
/*
* First define what the actual subs. return
*/
extern struct mbuf *nfsm_reqh();
struct mbuf *nfsm_reqh __P((struct vnode *vp, u_long procid, int hsiz,
caddr_t *bposp));
struct mbuf *nfsm_rpchead __P((struct ucred *cr, int nmflag, int procid,
int auth_type, int auth_len, char *auth_str,
int verf_len, char *verf_str,
struct mbuf *mrest, int mrest_len,
struct mbuf **mbp, u_long *xidp));
#define M_HASCL(m) ((m)->m_flags & M_EXT)
#define NFSMINOFF(m) \

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_nqlease.c 8.3 (Berkeley) 1/4/94
* $Id: nfs_nqlease.c,v 1.12 1995/06/27 11:06:36 dfr Exp $
* $Id: nfs_nqlease.c,v 1.13 1995/08/11 11:31:10 davidg Exp $
*/
/*
@ -530,7 +530,7 @@ nqsrv_send_eviction(vp, lp, slp, nam, cred)
m = nfsm_rpchead(cred, (NFSMNT_NFSV3 | NFSMNT_NQNFS),
NQNFSPROC_EVICTED,
RPCAUTH_UNIX, 5 * NFSX_UNSIGNED, (char *)0,
mreq, siz, &mheadend, &xid);
0, (char *)NULL, mreq, siz, &mheadend, &xid);
/*
* For stream protocols, prepend a Sun RPC
* Record Mark.
@ -911,7 +911,7 @@ nqnfs_vacated(vp, cred)
}
m = nfsm_rpchead(cred, nmp->nm_flag, NQNFSPROC_VACATED,
RPCAUTH_UNIX, 5 * NFSX_UNSIGNED, (char *)0,
mreq, i, &mheadend, &xid);
0, (char *)NULL, mreq, i, &mheadend, &xid);
if (nmp->nm_sotype == SOCK_STREAM) {
M_PREPEND(m, NFSX_UNSIGNED, M_WAIT);
*mtod(m, u_long *) = htonl(0x80000000 | (m->m_pkthdr.len -

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94
* $Id: nfs_serv.c,v 1.21 1995/08/03 12:14:16 dfr Exp $
* $Id: nfs_serv.c,v 1.22 1995/08/06 11:55:25 davidg Exp $
*/
/*
@ -2483,7 +2483,7 @@ nfsrv_readdir(nfsd, slp, procp, mrq)
int siz, cnt, fullsiz, eofflag, rdonly, cache, ncookies;
int v3 = (nfsd->nd_flag & ND_NFSV3);
u_quad_t frev, off, toff, verf;
u_long *cookies = NULL, *cookiep;
u_int *cookies = NULL, *cookiep;
fhp = &nfh.fh_generic;
nfsm_srvmtofh(fhp);
@ -2755,7 +2755,7 @@ nfsrv_readdirplus(nfsd, slp, procp, mrq)
int len, nlen, rem, xfer, tsiz, i, error = 0, getret = 1;
int siz, cnt, fullsiz, eofflag, rdonly, cache, dirlen, ncookies;
u_quad_t frev, off, toff, verf;
u_long *cookies = NULL, *cookiep;
u_int *cookies = NULL, *cookiep;
fhp = &nfh.fh_generic;
nfsm_srvmtofh(fhp);

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfsm_subs.h 8.1 (Berkeley) 6/16/93
* $Id: nfsm_subs.h,v 1.6 1995/05/30 08:12:51 rgrimes Exp $
* $Id: nfsm_subs.h,v 1.7 1995/06/27 11:06:55 dfr Exp $
*/
#ifndef _NFS_NFSM_SUBS_H_
@ -50,7 +50,13 @@
/*
* First define what the actual subs. return
*/
extern struct mbuf *nfsm_reqh();
struct mbuf *nfsm_reqh __P((struct vnode *vp, u_long procid, int hsiz,
caddr_t *bposp));
struct mbuf *nfsm_rpchead __P((struct ucred *cr, int nmflag, int procid,
int auth_type, int auth_len, char *auth_str,
int verf_len, char *verf_str,
struct mbuf *mrest, int mrest_len,
struct mbuf **mbp, u_long *xidp));
#define M_HASCL(m) ((m)->m_flags & M_EXT)
#define NFSMINOFF(m) \

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfsm_subs.h 8.1 (Berkeley) 6/16/93
* $Id: nfsm_subs.h,v 1.6 1995/05/30 08:12:51 rgrimes Exp $
* $Id: nfsm_subs.h,v 1.7 1995/06/27 11:06:55 dfr Exp $
*/
#ifndef _NFS_NFSM_SUBS_H_
@ -50,7 +50,13 @@
/*
* First define what the actual subs. return
*/
extern struct mbuf *nfsm_reqh();
struct mbuf *nfsm_reqh __P((struct vnode *vp, u_long procid, int hsiz,
caddr_t *bposp));
struct mbuf *nfsm_rpchead __P((struct ucred *cr, int nmflag, int procid,
int auth_type, int auth_len, char *auth_str,
int verf_len, char *verf_str,
struct mbuf *mrest, int mrest_len,
struct mbuf **mbp, u_long *xidp));
#define M_HASCL(m) ((m)->m_flags & M_EXT)
#define NFSMINOFF(m) \

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94
* $Id: nfs_serv.c,v 1.21 1995/08/03 12:14:16 dfr Exp $
* $Id: nfs_serv.c,v 1.22 1995/08/06 11:55:25 davidg Exp $
*/
/*
@ -2483,7 +2483,7 @@ nfsrv_readdir(nfsd, slp, procp, mrq)
int siz, cnt, fullsiz, eofflag, rdonly, cache, ncookies;
int v3 = (nfsd->nd_flag & ND_NFSV3);
u_quad_t frev, off, toff, verf;
u_long *cookies = NULL, *cookiep;
u_int *cookies = NULL, *cookiep;
fhp = &nfh.fh_generic;
nfsm_srvmtofh(fhp);
@ -2755,7 +2755,7 @@ nfsrv_readdirplus(nfsd, slp, procp, mrq)
int len, nlen, rem, xfer, tsiz, i, error = 0, getret = 1;
int siz, cnt, fullsiz, eofflag, rdonly, cache, dirlen, ncookies;
u_quad_t frev, off, toff, verf;
u_long *cookies = NULL, *cookiep;
u_int *cookies = NULL, *cookiep;
fhp = &nfh.fh_generic;
nfsm_srvmtofh(fhp);

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfsm_subs.h 8.1 (Berkeley) 6/16/93
* $Id: nfsm_subs.h,v 1.6 1995/05/30 08:12:51 rgrimes Exp $
* $Id: nfsm_subs.h,v 1.7 1995/06/27 11:06:55 dfr Exp $
*/
#ifndef _NFS_NFSM_SUBS_H_
@ -50,7 +50,13 @@
/*
* First define what the actual subs. return
*/
extern struct mbuf *nfsm_reqh();
struct mbuf *nfsm_reqh __P((struct vnode *vp, u_long procid, int hsiz,
caddr_t *bposp));
struct mbuf *nfsm_rpchead __P((struct ucred *cr, int nmflag, int procid,
int auth_type, int auth_len, char *auth_str,
int verf_len, char *verf_str,
struct mbuf *mrest, int mrest_len,
struct mbuf **mbp, u_long *xidp));
#define M_HASCL(m) ((m)->m_flags & M_EXT)
#define NFSMINOFF(m) \