summaryrefslogtreecommitdiff
path: root/nuttx/fs/nfs/nfs_vfsops.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-06-08 18:56:01 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-06-08 18:56:01 +0000
commitc59c1efa5e7c9f89665a1e9a4d4792094684f5e9 (patch)
treeacc0a9bb40b04c8e349e7db48cf8e1a66eb8a62f /nuttx/fs/nfs/nfs_vfsops.c
parent5f0d8a417e3b698ee0e382473dd2fa05d1d494e6 (diff)
downloadpx4-nuttx-c59c1efa5e7c9f89665a1e9a4d4792094684f5e9.tar.gz
px4-nuttx-c59c1efa5e7c9f89665a1e9a4d4792094684f5e9.tar.bz2
px4-nuttx-c59c1efa5e7c9f89665a1e9a4d4792094684f5e9.zip
NFS update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4818 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/nfs/nfs_vfsops.c')
-rw-r--r--nuttx/fs/nfs/nfs_vfsops.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/nuttx/fs/nfs/nfs_vfsops.c b/nuttx/fs/nfs/nfs_vfsops.c
index b538c2743..655d552d1 100644
--- a/nuttx/fs/nfs/nfs_vfsops.c
+++ b/nuttx/fs/nfs/nfs_vfsops.c
@@ -764,7 +764,7 @@ int nfs_readdirrpc(struct nfsmount *nmp, struct nfsnode *np,
}
/* Check for EOF */
-
+#if 0 /* This logic is NOT correct */
if (*ptr != 0)
{
np->n_direofoffset = fxdr_hyper(&dir->u.nfs.cookie[0]);
@@ -776,11 +776,11 @@ int nfs_readdirrpc(struct nfsmount *nmp, struct nfsnode *np,
fdbg("End of directory\n");
error = ENOENT;
}
+#endif
/* Otherwise, there is an entry. Get the file ID and point to the length */
+ /* Missing logic to get the file ID */
-// dir->fd_dir.d_type = entry->fileid;
-#warning "This must match the type values in dirent.h"
ptr += 2;
/* Get the length and point to the name */
@@ -807,7 +807,13 @@ int nfs_readdirrpc(struct nfsmount *nmp, struct nfsnode *np,
ptr++; /* Just skip over the nextentry for now */
/* Return the Type of the node to the caller */
- /* MISSING LOGIC */
+ /* MISSING LOGIC TO DETERMINE FILE TYPE -- Need to (1) get nfstype, and (2)
+ * map NFREG, NFDIR, etc. to values in dirent.h.
+ */
+
+ dir->fd_dir.d_type = DTYPE_FILE;
+// dir->fd_dir.d_type = entry->fileid;
+#warning "This must match the type values in dirent.h"
/* Return the name of the node to the caller */