diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-06-14 15:45:38 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-06-14 15:45:38 +0000 |
commit | 7a3c59297e918b0501d023d7f5d3663abafc7227 (patch) | |
tree | fca3926d7e437ea1dc6cf998cbe666348129ca69 /nuttx/fs/nfs/nfs_util.c | |
parent | 00f8ced6f0782724bd94c8df44ef6f8c5f7a968d (diff) | |
download | px4-nuttx-7a3c59297e918b0501d023d7f5d3663abafc7227.tar.gz px4-nuttx-7a3c59297e918b0501d023d7f5d3663abafc7227.tar.bz2 px4-nuttx-7a3c59297e918b0501d023d7f5d3663abafc7227.zip |
More NFS buffering improvements
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4842 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/nfs/nfs_util.c')
-rw-r--r-- | nuttx/fs/nfs/nfs_util.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/nuttx/fs/nfs/nfs_util.c b/nuttx/fs/nfs/nfs_util.c index 643117e22..8ab3e974e 100644 --- a/nuttx/fs/nfs/nfs_util.c +++ b/nuttx/fs/nfs/nfs_util.c @@ -215,8 +215,6 @@ int nfs_lookup(struct nfsmount *nmp, FAR const char *filename, FAR struct nfs_fattr *obj_attributes, FAR struct nfs_fattr *dir_attributes) { - struct rpc_call_lookup request; - struct rpc_reply_lookup response; FAR uint32_t *ptr; uint32_t value; int reqlen; @@ -236,7 +234,7 @@ int nfs_lookup(struct nfsmount *nmp, FAR const char *filename, /* Initialize the request */ - ptr = (FAR uint32_t*)&request.lookup; + ptr = (FAR uint32_t *)&nmp->nm_msgbuffer.lookup.lookup; reqlen = 0; /* Copy the variable length, directory file handle */ @@ -260,8 +258,9 @@ int nfs_lookup(struct nfsmount *nmp, FAR const char *filename, nfs_statistics(NFSPROC_LOOKUP); error = nfs_request(nmp, NFSPROC_LOOKUP, - (FAR void *)&request, reqlen, - (FAR void *)&response, sizeof(struct rpc_reply_lookup)); + (FAR void *)&nmp->nm_msgbuffer.lookup, reqlen, + (FAR void *)nmp->nm_iobuffer, nmp->nm_buflen); + if (error) { fdbg("ERROR: nfs_request failed: %d\n", error); @@ -273,7 +272,7 @@ int nfs_lookup(struct nfsmount *nmp, FAR const char *filename, * may differ in size whereas struct rpc_reply_lookup uses a fixed size. */ - ptr = (FAR uint32_t*)&response.lookup; + ptr = (FAR uint32_t *)&((FAR struct rpc_reply_lookup *)nmp->nm_iobuffer)->lookup; /* Get the length of the file handle */ |