diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-06-11 21:16:35 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-06-11 21:16:35 +0000 |
commit | bd8ecb86d024eee0bdef1687b582f64879354c36 (patch) | |
tree | da8b6f57fb17a32a5be0c935529f070dac5affc6 /nuttx/fs/nfs/nfs_util.c | |
parent | 0b9b04441d3bb7ad5386f35b4af31e5c551ab5b1 (diff) | |
download | px4-nuttx-bd8ecb86d024eee0bdef1687b582f64879354c36.tar.gz px4-nuttx-bd8ecb86d024eee0bdef1687b582f64879354c36.tar.bz2 px4-nuttx-bd8ecb86d024eee0bdef1687b582f64879354c36.zip |
NFS update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4829 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/nfs/nfs_util.c')
-rw-r--r-- | nuttx/fs/nfs/nfs_util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/fs/nfs/nfs_util.c b/nuttx/fs/nfs/nfs_util.c index 0d61ed3d9..8a3a1e579 100644 --- a/nuttx/fs/nfs/nfs_util.c +++ b/nuttx/fs/nfs/nfs_util.c @@ -380,7 +380,7 @@ int nfs_lookup(struct nfsmount *nmp, FAR const char *filename, value = *ptr++; value = fxdr_unsigned(uint32_t, value); - if (value > NFSX_V2FH) + if (value > NFSX_V3FHMAX) { fdbg("ERROR: Bad file handle length: %d\n", value); return EIO; @@ -444,7 +444,7 @@ int nfs_findnode(struct nfsmount *nmp, FAR const char *relpath, /* Start with the file handle of the root directory. */ fhandle->length = nmp->nm_fhsize; - memcpy(&fhandle->handle, &nmp->nm_fh, sizeof(nfsfh_t)); + memcpy(&fhandle->handle, &nmp->nm_fh, nmp->nm_fhsize); /* If no path was provided, then the root directory must be exactly what * the caller is looking for. @@ -560,7 +560,7 @@ int nfs_finddir(struct nfsmount *nmp, FAR const char *relpath, /* Start with the file handle of the root directory. */ fhandle->length = nmp->nm_fhsize; - memcpy(&fhandle->handle, &nmp->nm_fh, sizeof(nfsfh_t)); + memcpy(&fhandle->handle, &nmp->nm_fh, nmp->nm_fhsize); memcpy(attributes, &nmp->nm_fattr, sizeof(struct nfs_fattr)); /* Loop until the directory entry containing the path is found. */ |