summaryrefslogtreecommitdiff
path: root/nuttx/fs/nfs/nfs_proto.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-06-10 00:13:59 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-06-10 00:13:59 +0000
commite56f40210903c13eb07168de2acdf61c8babd2ae (patch)
tree94685ece210f7fd49cb823ae1762db64c57a163d /nuttx/fs/nfs/nfs_proto.h
parent59f64eb3c5ade626a3366355ae49344765d1a4c1 (diff)
downloadpx4-nuttx-e56f40210903c13eb07168de2acdf61c8babd2ae.tar.gz
px4-nuttx-e56f40210903c13eb07168de2acdf61c8babd2ae.tar.bz2
px4-nuttx-e56f40210903c13eb07168de2acdf61c8babd2ae.zip
NFS update
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4822 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/nfs/nfs_proto.h')
-rw-r--r--nuttx/fs/nfs/nfs_proto.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/nuttx/fs/nfs/nfs_proto.h b/nuttx/fs/nfs/nfs_proto.h
index 20e80d833..1aeba0a6a 100644
--- a/nuttx/fs/nfs/nfs_proto.h
+++ b/nuttx/fs/nfs/nfs_proto.h
@@ -316,10 +316,10 @@ typedef enum
NFREG = 1, /* Regular file */
NFDIR = 2, /* Directory */
NFBLK = 3, /* Block special device file */
- NFCHR = 4, /* Characgter special device file */
+ NFCHR = 4, /* Character special device file */
NFLNK = 5, /* Symbolic link */
NFSOCK = 6, /* Socket */
- NFFIFO = 7
+ NFFIFO = 7 /* Named FIFO */
} nfstype;
typedef struct
@@ -588,10 +588,12 @@ struct LOOKUP3args
{
struct file_handle dirhandle;
uint32_t namelen;
- uint32_t name[1]; /* Actual size determined by namelen */
+ uint32_t name[(NAME_MAX+3) >> 2]; /* Actual size determined by namelen */
};
-#define SIZEOF_LOOKUP3args(n) \
- (sizeof(struct LOOKUP3args) + ((((n)+3) >> 2) - 1)*sizeof(uint32_t))
+
+/* Actual size of LOOKUP3args */
+
+#define SIZEOF_LOOKUP3args(n) (sizeof(struct file_handle) + sizeof(namelen) + (((n)+3) & ~3))
struct LOOKUP3resok
{