diff options
Diffstat (limited to 'nuttx/fs/fs_statfs.c')
-rw-r--r-- | nuttx/fs/fs_statfs.c | 6 |
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 |