[DFS] fix compiling warning in NFS
This commit is contained in:
parent
d0d239cd4c
commit
6cab3b7dfa
|
@ -11,13 +11,6 @@
|
|||
bool_t
|
||||
xdr_fhandle3(register XDR *xdrs, fhandle3 *objp)
|
||||
{
|
||||
|
||||
#if defined(_LP64) || defined(_KERNEL)
|
||||
register int *buf;
|
||||
#else
|
||||
register long *buf;
|
||||
#endif
|
||||
|
||||
if (!xdr_bytes(xdrs, (char **)&objp->fhandle3_val, (unsigned int *) &objp->fhandle3_len, FHSIZE3))
|
||||
return (FALSE);
|
||||
return (TRUE);
|
||||
|
@ -26,13 +19,6 @@ xdr_fhandle3(register XDR *xdrs, fhandle3 *objp)
|
|||
bool_t
|
||||
xdr_dirpath(register XDR *xdrs, dirpath *objp)
|
||||
{
|
||||
|
||||
#if defined(_LP64) || defined(_KERNEL)
|
||||
register int *buf;
|
||||
#else
|
||||
register long *buf;
|
||||
#endif
|
||||
|
||||
if (!xdr_string(xdrs, objp, MNTPATHLEN))
|
||||
return (FALSE);
|
||||
return (TRUE);
|
||||
|
@ -41,13 +27,6 @@ xdr_dirpath(register XDR *xdrs, dirpath *objp)
|
|||
bool_t
|
||||
xdr_name(register XDR *xdrs, name *objp)
|
||||
{
|
||||
|
||||
#if defined(_LP64) || defined(_KERNEL)
|
||||
register int *buf;
|
||||
#else
|
||||
register long *buf;
|
||||
#endif
|
||||
|
||||
if (!xdr_string(xdrs, objp, MNTNAMLEN))
|
||||
return (FALSE);
|
||||
return (TRUE);
|
||||
|
@ -56,13 +35,6 @@ xdr_name(register XDR *xdrs, name *objp)
|
|||
bool_t
|
||||
xdr_exports(register XDR *xdrs, exports *objp)
|
||||
{
|
||||
|
||||
#if defined(_LP64) || defined(_KERNEL)
|
||||
register int *buf;
|
||||
#else
|
||||
register long *buf;
|
||||
#endif
|
||||
|
||||
if (!xdr_pointer(xdrs, (char **)objp, sizeof (struct exportnode), (xdrproc_t) xdr_exportnode))
|
||||
return (FALSE);
|
||||
return (TRUE);
|
||||
|
@ -71,13 +43,6 @@ xdr_exports(register XDR *xdrs, exports *objp)
|
|||
bool_t
|
||||
xdr_groups(register XDR *xdrs, groups *objp)
|
||||
{
|
||||
|
||||
#if defined(_LP64) || defined(_KERNEL)
|
||||
register int *buf;
|
||||
#else
|
||||
register long *buf;
|
||||
#endif
|
||||
|
||||
if (!xdr_pointer(xdrs, (char **)objp, sizeof (struct groupnode), (xdrproc_t) xdr_groupnode))
|
||||
return (FALSE);
|
||||
return (TRUE);
|
||||
|
@ -86,13 +51,6 @@ xdr_groups(register XDR *xdrs, groups *objp)
|
|||
bool_t
|
||||
xdr_mountlist(register XDR *xdrs, mountlist *objp)
|
||||
{
|
||||
|
||||
#if defined(_LP64) || defined(_KERNEL)
|
||||
register int *buf;
|
||||
#else
|
||||
register long *buf;
|
||||
#endif
|
||||
|
||||
if (!xdr_pointer(xdrs, (char **)objp, sizeof (struct mountbody), (xdrproc_t) xdr_mountbody))
|
||||
return (FALSE);
|
||||
return (TRUE);
|
||||
|
@ -103,17 +61,11 @@ xdr_mountstat3(register XDR *xdrs, mountstat3 *objp)
|
|||
{
|
||||
int enum_objp;
|
||||
|
||||
#if defined(_LP64) || defined(_KERNEL)
|
||||
register int *buf;
|
||||
#else
|
||||
register long *buf;
|
||||
#endif
|
||||
|
||||
enum_objp = *objp;
|
||||
|
||||
if (!xdr_enum(xdrs, (enum_t *)&enum_objp))
|
||||
{
|
||||
*objp = enum_objp;
|
||||
*objp = (mountstat3)enum_objp;
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
@ -123,13 +75,6 @@ xdr_mountstat3(register XDR *xdrs, mountstat3 *objp)
|
|||
bool_t
|
||||
xdr_mountres3_ok(register XDR *xdrs, mountres3_ok *objp)
|
||||
{
|
||||
|
||||
#if defined(_LP64) || defined(_KERNEL)
|
||||
register int *buf;
|
||||
#else
|
||||
register long *buf;
|
||||
#endif
|
||||
|
||||
if (!xdr_fhandle3(xdrs, &objp->fhandle))
|
||||
return (FALSE);
|
||||
if (!xdr_array(xdrs, (char **)&objp->auth_flavors.auth_flavors_val, (unsigned int *) &objp->auth_flavors.auth_flavors_len, ~0,
|
||||
|
@ -141,13 +86,6 @@ xdr_mountres3_ok(register XDR *xdrs, mountres3_ok *objp)
|
|||
bool_t
|
||||
xdr_mountres3(register XDR *xdrs, mountres3 *objp)
|
||||
{
|
||||
|
||||
#if defined(_LP64) || defined(_KERNEL)
|
||||
register int *buf;
|
||||
#else
|
||||
register long *buf;
|
||||
#endif
|
||||
|
||||
if (!xdr_mountstat3(xdrs, &objp->fhs_status))
|
||||
return (FALSE);
|
||||
switch (objp->fhs_status) {
|
||||
|
@ -162,13 +100,6 @@ xdr_mountres3(register XDR *xdrs, mountres3 *objp)
|
|||
bool_t
|
||||
xdr_mountbody(register XDR *xdrs, mountbody *objp)
|
||||
{
|
||||
|
||||
#if defined(_LP64) || defined(_KERNEL)
|
||||
register int *buf;
|
||||
#else
|
||||
register long *buf;
|
||||
#endif
|
||||
|
||||
if (!xdr_name(xdrs, &objp->ml_hostname))
|
||||
return (FALSE);
|
||||
if (!xdr_dirpath(xdrs, &objp->ml_directory))
|
||||
|
@ -181,13 +112,6 @@ xdr_mountbody(register XDR *xdrs, mountbody *objp)
|
|||
bool_t
|
||||
xdr_groupnode(register XDR *xdrs, groupnode *objp)
|
||||
{
|
||||
|
||||
#if defined(_LP64) || defined(_KERNEL)
|
||||
register int *buf;
|
||||
#else
|
||||
register long *buf;
|
||||
#endif
|
||||
|
||||
if (!xdr_name(xdrs, &objp->gr_name))
|
||||
return (FALSE);
|
||||
if (!xdr_groups(xdrs, &objp->gr_next))
|
||||
|
@ -198,13 +122,6 @@ xdr_groupnode(register XDR *xdrs, groupnode *objp)
|
|||
bool_t
|
||||
xdr_exportnode(register XDR *xdrs, exportnode *objp)
|
||||
{
|
||||
|
||||
#if defined(_LP64) || defined(_KERNEL)
|
||||
register int *buf;
|
||||
#else
|
||||
register long *buf;
|
||||
#endif
|
||||
|
||||
if (!xdr_dirpath(xdrs, &objp->ex_dir))
|
||||
return (FALSE);
|
||||
if (!xdr_groups(xdrs, &objp->ex_groups))
|
||||
|
|
|
@ -151,7 +151,7 @@ xdr_nfsstat3(register XDR *xdrs, nfsstat3 *objp)
|
|||
enum_objp = *objp;
|
||||
if (!xdr_enum(xdrs, (enum_t *)objp))
|
||||
{
|
||||
*objp = enum_objp;
|
||||
*objp = (nfsstat3)enum_objp;
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ xdr_ftype3(register XDR *xdrs, ftype3 *objp)
|
|||
enum_objp = *objp;
|
||||
if (!xdr_enum(xdrs, (enum_t *)objp))
|
||||
{
|
||||
*objp = enum_objp;
|
||||
*objp = (ftype3)enum_objp;
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ xdr_stable_how(register XDR *xdrs, stable_how *objp)
|
|||
enum_objp = *objp;
|
||||
if (!xdr_enum(xdrs, (enum_t *)objp))
|
||||
{
|
||||
*objp = enum_objp;
|
||||
*objp = (stable_how)enum_objp;
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ xdr_createmode3(register XDR *xdrs, createmode3 *objp)
|
|||
enum_objp = *objp;
|
||||
if (!xdr_enum(xdrs, (enum_t *)objp))
|
||||
{
|
||||
*objp = enum_objp;
|
||||
*objp = (createmode3)enum_objp;
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
@ -343,7 +343,7 @@ xdr_time_how(register XDR *xdrs, time_how *objp)
|
|||
enum_objp = *objp;
|
||||
if (!xdr_enum(xdrs, (enum_t *)objp))
|
||||
{
|
||||
*objp = enum_objp;
|
||||
*objp = (time_how)enum_objp;
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ AUTH *authnone_create()
|
|||
register struct authnone_private *ap = authnone_private;
|
||||
XDR xdr_stream;
|
||||
register XDR *xdrs;
|
||||
extern bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);
|
||||
|
||||
if (ap == 0) {
|
||||
ap = (struct authnone_private *) rt_malloc (sizeof(*ap));
|
||||
|
@ -95,9 +96,7 @@ AUTH *authnone_create()
|
|||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static bool_t authnone_marshal(client, xdrs)
|
||||
AUTH *client;
|
||||
XDR *xdrs;
|
||||
static bool_t authnone_marshal(AUTH *client, XDR *xdrs)
|
||||
{
|
||||
register struct authnone_private *ap = authnone_private;
|
||||
|
||||
|
|
|
@ -135,6 +135,10 @@ CLIENT *clntudp_bufcreate(struct sockaddr_in *raddr,
|
|||
|
||||
if (raddr->sin_port == 0) {
|
||||
unsigned short port;
|
||||
extern unsigned short pmap_getport(struct sockaddr_in *address,
|
||||
unsigned long program,
|
||||
unsigned long version,
|
||||
unsigned int protocol);
|
||||
|
||||
if ((port =
|
||||
pmap_getport(raddr, program, version, IPPROTO_UDP)) == 0) {
|
||||
|
@ -165,8 +169,6 @@ CLIENT *clntudp_bufcreate(struct sockaddr_in *raddr,
|
|||
cu->cu_xdrpos = XDR_GETPOS(&(cu->cu_outxdrs));
|
||||
if (*sockp < 0)
|
||||
{
|
||||
int dontblock = 1;
|
||||
|
||||
*sockp = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
if (*sockp < 0)
|
||||
{
|
||||
|
@ -229,7 +231,10 @@ call_again:
|
|||
|
||||
if ((!XDR_PUTLONG(xdrs, (long *) &proc)) ||
|
||||
(!AUTH_MARSHALL(cl->cl_auth, xdrs)) || (!(*xargs) (xdrs, argsp)))
|
||||
return (cu->cu_error.re_status = RPC_CANTENCODEARGS);
|
||||
{
|
||||
cu->cu_error.re_status = RPC_CANTENCODEARGS;
|
||||
return RPC_CANTENCODEARGS;
|
||||
}
|
||||
outlen = (int) XDR_GETPOS(xdrs);
|
||||
|
||||
send_again:
|
||||
|
@ -238,7 +243,9 @@ send_again:
|
|||
!= outlen)
|
||||
{
|
||||
cu->cu_error.re_errno = errno;
|
||||
return (cu->cu_error.re_status = RPC_CANTSEND);
|
||||
cu->cu_error.re_status = RPC_CANTSEND;
|
||||
|
||||
return RPC_CANTSEND;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -264,7 +271,9 @@ send_again:
|
|||
{
|
||||
rt_kprintf("recv error, len %d\n", inlen);
|
||||
cu->cu_error.re_errno = errno;
|
||||
return (cu->cu_error.re_status = RPC_CANTRECV);
|
||||
cu->cu_error.re_status = RPC_CANTRECV;
|
||||
|
||||
return RPC_CANTRECV;
|
||||
}
|
||||
|
||||
/* see if reply transaction id matches sent id */
|
||||
|
@ -292,6 +301,8 @@ send_again:
|
|||
}
|
||||
if (reply_msg.acpted_rply.ar_verf.oa_base != NULL)
|
||||
{
|
||||
extern bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);
|
||||
|
||||
xdrs->x_op = XDR_FREE;
|
||||
(void) xdr_opaque_auth(xdrs, &(reply_msg.acpted_rply.ar_verf));
|
||||
}
|
||||
|
@ -311,7 +322,7 @@ send_again:
|
|||
cu->cu_error.re_status = RPC_CANTDECODERES;
|
||||
}
|
||||
|
||||
return (cu->cu_error.re_status);
|
||||
return (enum clnt_stat)(cu->cu_error.re_status);
|
||||
}
|
||||
|
||||
static void clntudp_geterr(CLIENT *cl, struct rpc_err *errp)
|
||||
|
|
|
@ -6,9 +6,7 @@ static struct timeval timeout = { 5, 0 };
|
|||
static struct timeval tottimeout = { 60, 0 };
|
||||
|
||||
|
||||
bool_t xdr_pmap(xdrs, regs)
|
||||
XDR *xdrs;
|
||||
struct pmap *regs;
|
||||
bool_t xdr_pmap(XDR *xdrs, struct pmap *regs)
|
||||
{
|
||||
if (xdr_u_long(xdrs, ®s->pm_prog) &&
|
||||
xdr_u_long(xdrs, ®s->pm_vers) &&
|
||||
|
@ -22,11 +20,7 @@ struct pmap *regs;
|
|||
* Calls the pmap service remotely to do the lookup.
|
||||
* Returns 0 if no map exists.
|
||||
*/
|
||||
unsigned short pmap_getport(address, program, version, protocol)
|
||||
struct sockaddr_in *address;
|
||||
unsigned long program;
|
||||
unsigned long version;
|
||||
unsigned int protocol;
|
||||
unsigned short pmap_getport(struct sockaddr_in *address, unsigned long program, unsigned long version, unsigned int protocol)
|
||||
{
|
||||
unsigned short port = 0;
|
||||
int socket = -1;
|
||||
|
|
|
@ -52,9 +52,7 @@ static char sccsid[] = "@(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";
|
|||
* XDR an opaque authentication struct
|
||||
* (see auth.h)
|
||||
*/
|
||||
bool_t xdr_opaque_auth(xdrs, ap)
|
||||
register XDR *xdrs;
|
||||
register struct opaque_auth *ap;
|
||||
bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap)
|
||||
{
|
||||
|
||||
if (xdr_enum(xdrs, &(ap->oa_flavor)))
|
||||
|
@ -66,9 +64,7 @@ register struct opaque_auth *ap;
|
|||
/*
|
||||
* XDR a DES block
|
||||
*/
|
||||
bool_t xdr_des_block(xdrs, blkp)
|
||||
register XDR *xdrs;
|
||||
register des_block *blkp;
|
||||
bool_t xdr_des_block(XDR *xdrs, des_block *blkp)
|
||||
{
|
||||
return (xdr_opaque(xdrs, (char*) blkp, sizeof(des_block)));
|
||||
}
|
||||
|
@ -78,9 +74,7 @@ register des_block *blkp;
|
|||
/*
|
||||
* XDR the MSG_ACCEPTED part of a reply message union
|
||||
*/
|
||||
static bool_t xdr_accepted_reply(xdrs, ar)
|
||||
register XDR *xdrs;
|
||||
register struct accepted_reply *ar;
|
||||
static bool_t xdr_accepted_reply(XDR *xdrs, struct accepted_reply *ar)
|
||||
{
|
||||
|
||||
/* personalized union, rather than calling xdr_union */
|
||||
|
@ -104,9 +98,7 @@ register struct accepted_reply *ar;
|
|||
/*
|
||||
* XDR the MSG_DENIED part of a reply message union
|
||||
*/
|
||||
static bool_t xdr_rejected_reply(xdrs, rr)
|
||||
register XDR *xdrs;
|
||||
register struct rejected_reply *rr;
|
||||
static bool_t xdr_rejected_reply(XDR *xdrs, struct rejected_reply *rr)
|
||||
{
|
||||
|
||||
/* personalized union, rather than calling xdr_union */
|
||||
|
@ -134,9 +126,7 @@ static struct xdr_discrim reply_dscrm[3] = {
|
|||
/*
|
||||
* XDR a reply message
|
||||
*/
|
||||
bool_t xdr_replymsg(xdrs, rmsg)
|
||||
register XDR *xdrs;
|
||||
register struct rpc_msg *rmsg;
|
||||
bool_t xdr_replymsg(XDR *xdrs, struct rpc_msg *rmsg)
|
||||
{
|
||||
if (xdr_u_long(xdrs, &(rmsg->rm_xid)) &&
|
||||
xdr_enum(xdrs, (enum_t *) & (rmsg->rm_direction)) &&
|
||||
|
@ -153,9 +143,7 @@ register struct rpc_msg *rmsg;
|
|||
* The fields include: rm_xid, rm_direction, rpcvers, prog, and vers.
|
||||
* The rm_xid is not really static, but the user can easily munge on the fly.
|
||||
*/
|
||||
bool_t xdr_callhdr(xdrs, cmsg)
|
||||
register XDR *xdrs;
|
||||
register struct rpc_msg *cmsg;
|
||||
bool_t xdr_callhdr(XDR *xdrs, struct rpc_msg *cmsg)
|
||||
{
|
||||
|
||||
cmsg->rm_direction = CALL;
|
||||
|
@ -172,9 +160,7 @@ register struct rpc_msg *cmsg;
|
|||
|
||||
/* ************************** Client utility routine ************* */
|
||||
|
||||
static void accepted(acpt_stat, error)
|
||||
register enum accept_stat acpt_stat;
|
||||
register struct rpc_err *error;
|
||||
static void accepted(enum accept_stat acpt_stat, struct rpc_err *error)
|
||||
{
|
||||
|
||||
switch (acpt_stat) {
|
||||
|
@ -209,9 +195,7 @@ register struct rpc_err *error;
|
|||
error->re_lb.s2 = (long) acpt_stat;
|
||||
}
|
||||
|
||||
static void rejected(rjct_stat, error)
|
||||
register enum reject_stat rjct_stat;
|
||||
register struct rpc_err *error;
|
||||
static void rejected(enum reject_stat rjct_stat, struct rpc_err *error)
|
||||
{
|
||||
|
||||
switch (rjct_stat) {
|
||||
|
@ -233,9 +217,7 @@ register struct rpc_err *error;
|
|||
/*
|
||||
* given a reply message, fills in the error
|
||||
*/
|
||||
void _seterr_reply(msg, error)
|
||||
register struct rpc_msg *msg;
|
||||
register struct rpc_err *error;
|
||||
void _seterr_reply(struct rpc_msg *msg, struct rpc_err *error)
|
||||
{
|
||||
|
||||
/* optimized for normal, SUCCESSful case */
|
||||
|
@ -246,11 +228,11 @@ register struct rpc_err *error;
|
|||
error->re_status = RPC_SUCCESS;
|
||||
return;
|
||||
};
|
||||
accepted(msg->acpted_rply.ar_stat, error);
|
||||
accepted((enum accept_stat)msg->acpted_rply.ar_stat, error);
|
||||
break;
|
||||
|
||||
case MSG_DENIED:
|
||||
rejected(msg->rjcted_rply.rj_stat, error);
|
||||
rejected((enum reject_stat)msg->rjcted_rply.rj_stat, error);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -135,9 +135,7 @@ static unsigned int xdrmem_getpos (const XDR *xdrs)
|
|||
return ((unsigned long) xdrs->x_private - (unsigned long) xdrs->x_base);
|
||||
}
|
||||
|
||||
static bool_t xdrmem_setpos(xdrs, pos)
|
||||
register XDR *xdrs;
|
||||
unsigned int pos;
|
||||
static bool_t xdrmem_setpos(XDR *xdrs, unsigned int pos)
|
||||
{
|
||||
register char* newaddr = xdrs->x_base + pos;
|
||||
register char* lastaddr = xdrs->x_private + xdrs->x_handy;
|
||||
|
|
Loading…
Reference in New Issue