summaryrefslogtreecommitdiff
path: root/nuttx/fs/nfs/nfs_socket.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-05 23:17:25 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-05-05 23:17:25 +0000
commit5ec5d2ad4dc73eb8235d42f6b823754b53d7223d (patch)
tree3d90f49b12de4032eef21df067f4d2dff75a3221 /nuttx/fs/nfs/nfs_socket.c
parentfffb5bd4f05cf422e06f650f4d13b40fe9675463 (diff)
downloadpx4-nuttx-5ec5d2ad4dc73eb8235d42f6b823754b53d7223d.tar.gz
px4-nuttx-5ec5d2ad4dc73eb8235d42f6b823754b53d7223d.tar.bz2
px4-nuttx-5ec5d2ad4dc73eb8235d42f6b823754b53d7223d.zip
Add GPIO support to STMPE11 driver; NFS update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4701 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/nfs/nfs_socket.c')
-rw-r--r--nuttx/fs/nfs/nfs_socket.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/nuttx/fs/nfs/nfs_socket.c b/nuttx/fs/nfs/nfs_socket.c
index 0dc8860a0..93e84c0e6 100644
--- a/nuttx/fs/nfs/nfs_socket.c
+++ b/nuttx/fs/nfs/nfs_socket.c
@@ -145,7 +145,7 @@ int nfs_connect(struct nfsmount *nmp)
rpc->rc_authtype = RPCAUTH_NULL; /* for now */
//rpc->rc_servername = nmp->nm_mountp->mnt_stat.f_mntfromname;
- rpc->rc_name = nmp->nm_nam;
+ rpc->rc_name = &nmp->nm_nam;
rpc->rc_sotype = nmp->nm_sotype;
rpc->rc_soproto = nmp->nm_soproto;
@@ -184,30 +184,21 @@ int nfs_request(struct nfsmount *nmp, int procnum, void *datain, void *dataout)
{
int error;
struct rpcclnt *clnt= nmp->nm_rpcclnt;
- struct rpc_reply *reply;
+ struct rpc_reply reply;
int trylater_delay;
- /* Create an instance of the reply state structure */
-
- reply = (struct rpc_reply *)kzalloc(sizeof(struct rpc_reply));
- if (!reply)
- {
- fdbg("Failed to allocate reply structure\n");
- return -ENOMEM;
- }
-
tryagain:
- if ((error = rpcclnt_request(clnt, procnum, reply, datain)) != 0)
+ if ((error = rpcclnt_request(clnt, procnum, &reply, datain)) != 0)
{
goto out;
}
- dataout = &reply->stat.where;
+ bcopy (dataout, &reply.stat.where, sizeof(reply.stat.where));
- if (reply->rpc_verfi.authtype != 0)
+ if (reply.rpc_verfi.authtype != 0)
{
- error = fxdr_unsigned(int, reply->rpc_verfi.authtype);
+ error = fxdr_unsigned(int, reply.rpc_verfi.authtype);
if ((nmp->nm_flag & NFSMNT_NFSV3) && error == NFSERR_TRYLATER)
{