mirror of
https://github.com/apache/nuttx.git
synced 2026-05-19 20:06:24 +08:00
NFS update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4713 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+8
-6
@@ -10,7 +10,7 @@
|
||||
* copyright (c) 2004
|
||||
* the regents of the university of michigan
|
||||
* all rights reserved
|
||||
*
|
||||
*
|
||||
* permission is granted to use, copy, create derivative works and redistribute
|
||||
* this software and such derivative works for any purpose, so long as the name
|
||||
* of the university of michigan is not used in any advertising or publicity
|
||||
@@ -18,7 +18,7 @@
|
||||
* written prior authorization. if the above copyright notice or any other
|
||||
* identification of the university of michigan is included in any copy of any
|
||||
* portion of this software, then the disclaimer below must also be included.
|
||||
*
|
||||
*
|
||||
* this software is provided as is, without representation from the university
|
||||
* of michigan as to its fitness for any purpose, and without warranty by the
|
||||
* university of michigan of any kind, either express or implied, including
|
||||
@@ -160,7 +160,7 @@ int nfs_connect(struct nfsmount *nmp)
|
||||
|
||||
rpc->rc_proctlen = 0;
|
||||
rpc->rc_proct = NULL;
|
||||
|
||||
|
||||
nmp->nm_rpcclnt = rpc;
|
||||
|
||||
return rpcclnt_connect(rpc);
|
||||
@@ -180,7 +180,7 @@ void nfs_safedisconnect(struct nfsmount *nmp)
|
||||
}
|
||||
#endif
|
||||
|
||||
int nfs_request(struct nfsmount *nmp, int procnum, void *datain, void *dataout)
|
||||
int nfs_request(struct nfsmount *nmp, int procnum, void *datain, void **dataout)
|
||||
{
|
||||
int error;
|
||||
struct rpcclnt *clnt= nmp->nm_rpcclnt;
|
||||
@@ -189,12 +189,14 @@ int nfs_request(struct nfsmount *nmp, int procnum, void *datain, void *dataout)
|
||||
|
||||
tryagain:
|
||||
|
||||
memset(&reply, 0, sizeof(reply));
|
||||
|
||||
if ((error = rpcclnt_request(clnt, procnum, &reply, datain)) != 0)
|
||||
{
|
||||
goto out;
|
||||
}
|
||||
|
||||
bcopy (dataout, &reply.stat.where, sizeof(reply.stat.where));
|
||||
*dataout = (void *)reply.stat.where;
|
||||
|
||||
if (reply.rpc_verfi.authtype != 0)
|
||||
{
|
||||
@@ -231,7 +233,7 @@ tryagain:
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
out:
|
||||
return error;
|
||||
}
|
||||
|
||||
+3
-3
@@ -10,7 +10,7 @@
|
||||
* copyright (c) 2004
|
||||
* the regents of the university of michigan
|
||||
* all rights reserved
|
||||
*
|
||||
*
|
||||
* permission is granted to use, copy, create derivative works and redistribute
|
||||
* this software and such derivative works for any purpose, so long as the name
|
||||
* of the university of michigan is not used in any advertising or publicity
|
||||
@@ -18,7 +18,7 @@
|
||||
* written prior authorization. if the above copyright notice or any other
|
||||
* identification of the university of michigan is included in any copy of any
|
||||
* portion of this software, then the disclaimer below must also be included.
|
||||
*
|
||||
*
|
||||
* this software is provided as is, without representation from the university
|
||||
* of michigan as to its fitness for any purpose, and without warranty by the
|
||||
* university of michigan of any kind, either express or implied, including
|
||||
@@ -61,7 +61,7 @@ EXTERN void nfs_disconnect(struct nfsmount *);
|
||||
EXTERN int nfs_sigintr(struct nfsmount *, struct nfsreq *, cthread_t *);
|
||||
EXTERN void nfs_safedisconnect(struct nfsmount *);
|
||||
#endif
|
||||
EXTERN int nfs_request(struct nfsmount *, int, void*, void*);
|
||||
EXTERN int nfs_request(struct nfsmount *, int, void *, void **);
|
||||
EXTERN int nfs_nmcancelreqs(struct nfsmount *);
|
||||
|
||||
#undef EXTERN
|
||||
|
||||
+119
-153
File diff suppressed because it is too large
Load Diff
@@ -1117,8 +1117,6 @@ void rpcclnt_safedisconnect(struct rpcclnt *rpc)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* XXX: ignores tryagain! */
|
||||
|
||||
/* Code from nfs_request - goes something like this - fill in task struct -
|
||||
* links task into list - calls nfs_send() for first transmit - calls
|
||||
* nfs_receive() to get reply - fills in reply (which should be initialized
|
||||
@@ -1270,7 +1268,6 @@ int rpcclnt_request(struct rpcclnt *rpc, int procnum, struct rpc_reply *reply, v
|
||||
|
||||
/* Break down the rpc header and check if ok */
|
||||
|
||||
memset(reply, 0, sizeof(rpc_reply));
|
||||
reply->stat.type = fxdr_unsigned(uint32_t, replysvr->stat.type);
|
||||
if (reply->stat.type == RPC_MSGDENIED)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user