mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
Added statfs()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@261 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+5
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user