summaryrefslogtreecommitdiff
path: root/nuttx/fs/fs_statfs.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-05-29 00:31:17 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-05-29 00:31:17 +0000
commit642245aa3c464b76fce9807ca63229770b313027 (patch)
tree39b1938584d32944b1032c47d8003cdf99664769 /nuttx/fs/fs_statfs.c
parenta72bee0b87f055095a1f9e84208dd2c4a363dde2 (diff)
downloadpx4-nuttx-642245aa3c464b76fce9807ca63229770b313027.tar.gz
px4-nuttx-642245aa3c464b76fce9807ca63229770b313027.tar.bz2
px4-nuttx-642245aa3c464b76fce9807ca63229770b313027.zip
Added statfs()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@261 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fs_statfs.c')
-rw-r--r--nuttx/fs/fs_statfs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nuttx/fs/fs_statfs.c b/nuttx/fs/fs_statfs.c
index 24b9113ef..515723ed6 100644
--- a/nuttx/fs/fs_statfs.c
+++ b/nuttx/fs/fs_statfs.c
@@ -45,6 +45,7 @@
#include <sys/types.h>
#include <sys/statfs.h>
#include <string.h>
+#include <limits.h>
#include <sched.h>
#include <errno.h>
#include "fs_internal.h"
@@ -61,6 +62,9 @@
static inline int statpsuedofs(FAR struct inode *inode, FAR struct statfs *buf)
{
+ memset(buf, 0, sizeof(struct statfs));
+ buf->f_type = PROC_SUPER_MAGIC;
+ buf->f_namelen = NAME_MAX;
return OK;
}
@@ -132,7 +136,7 @@ int statfs(const char *path, struct statfs *buf)
{
/* Perform the rewinddir() operation */
- ret = inode->u.i_mops->statfs(inode, relpath, buf);
+ ret = inode->u.i_mops->statfs(inode, buf);
}
}
else