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:
patacongo
2012-05-07 23:33:39 +00:00
parent c5bbc7b71d
commit f5ad5f4bc2
4 changed files with 130 additions and 165 deletions
+8 -6
View File
@@ -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
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff
-3
View File
@@ -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)
{