summaryrefslogtreecommitdiff
path: root/nuttx/fs/nfs/nfs_util.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-06-11 17:14:46 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-06-11 17:14:46 +0000
commit28631daed8e885f68ff275c63a86af2555fb9fb8 (patch)
tree867c574fd954539794f708c1c21aff62db9259bb /nuttx/fs/nfs/nfs_util.c
parent4446a85a89ea7a248b6ba0542c34fd6aabd44a14 (diff)
downloadpx4-nuttx-28631daed8e885f68ff275c63a86af2555fb9fb8.tar.gz
px4-nuttx-28631daed8e885f68ff275c63a86af2555fb9fb8.tar.bz2
px4-nuttx-28631daed8e885f68ff275c63a86af2555fb9fb8.zip
NFS update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4827 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/nfs/nfs_util.c')
-rw-r--r--nuttx/fs/nfs/nfs_util.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/nuttx/fs/nfs/nfs_util.c b/nuttx/fs/nfs/nfs_util.c
index 5964248e7..ccf40b4fa 100644
--- a/nuttx/fs/nfs/nfs_util.c
+++ b/nuttx/fs/nfs/nfs_util.c
@@ -540,10 +540,9 @@ int nfs_findnode(struct nfsmount *nmp, FAR const char *relpath,
int nfs_finddir(struct nfsmount *nmp, FAR const char *relpath,
FAR struct file_handle *fhandle,
- FAR struct nfs_fattr *attributes)
+ FAR struct nfs_fattr *attributes, FAR char *filename)
{
FAR const char *path = relpath;
- char buffer[NAME_MAX+1];
uint32_t tmp;
char terminator;
int error;
@@ -569,13 +568,13 @@ int nfs_finddir(struct nfsmount *nmp, FAR const char *relpath,
{
/* Extract the next path segment name. */
- error = nfs_pathsegment(&path, buffer, &terminator);
+ error = nfs_pathsegment(&path, filename, &terminator);
if (error != 0)
{
/* The filename segment contains is too long. */
fdbg("nfs_pathsegment of \"%s\" failed after \"%s\": %d\n",
- relpath, buffer, error);
+ relpath, filename, error);
return error;
}
@@ -595,11 +594,11 @@ int nfs_finddir(struct nfsmount *nmp, FAR const char *relpath,
/* Look-up the next path segment */
- error = nfs_lookup(nmp, buffer, fhandle, attributes, NULL);
+ error = nfs_lookup(nmp, filename, fhandle, attributes, NULL);
if (error != 0)
{
fdbg("nfs_lookup of \"%s\" failed at \"%s\": %d\n",
- relpath, buffer, error);
+ relpath, filename, error);
return error;
}
@@ -611,7 +610,7 @@ int nfs_finddir(struct nfsmount *nmp, FAR const char *relpath,
/* Ooops.. we found something else */
fdbg("ERROR: Intermediate segment \"%s\" of \'%s\" is not a directory\n",
- buffer, path);
+ filename, path);
return ENOTDIR;
}
}