summaryrefslogtreecommitdiff
path: root/components/dfs
diff options
context:
space:
mode:
Diffstat (limited to 'components/dfs')
-rw-r--r--components/dfs/Kconfig6
-rw-r--r--components/dfs/filesystems/devfs/devfs.c12
-rw-r--r--components/dfs/include/dfs_fs.h2
-rw-r--r--components/dfs/src/dfs_file.c2
4 files changed, 9 insertions, 13 deletions
diff --git a/components/dfs/Kconfig b/components/dfs/Kconfig
index 39eca3c507..442c3bb260 100644
--- a/components/dfs/Kconfig
+++ b/components/dfs/Kconfig
@@ -14,13 +14,11 @@ if RT_USING_DFS
config DFS_FILESYSTEMS_MAX
int "The maximal number of mounted file system"
- default 4 if RT_USING_DFS_NFS
- default 2
+ default 4
config DFS_FILESYSTEM_TYPES_MAX
int "The maximal number of file system type"
- default 4 if RT_USING_DFS_NFS
- default 2
+ default 4
config DFS_FD_MAX
int "The maximal number of opened files"
diff --git a/components/dfs/filesystems/devfs/devfs.c b/components/dfs/filesystems/devfs/devfs.c
index 2e2248d5cc..d615482452 100644
--- a/components/dfs/filesystems/devfs/devfs.c
+++ b/components/dfs/filesystems/devfs/devfs.c
@@ -313,15 +313,13 @@ static const struct dfs_filesystem_ops _device_fs =
"devfs",
DFS_FS_FLAG_DEFAULT,
&_device_fops,
-
dfs_device_fs_mount,
- RT_NULL,
- RT_NULL,
- RT_NULL,
-
- RT_NULL,
+ RT_NULL, /*unmount*/
+ RT_NULL, /*mkfs*/
+ RT_NULL, /*statfs*/
+ RT_NULL, /*unlink*/
dfs_device_fs_stat,
- RT_NULL,
+ RT_NULL, /*rename*/
};
int devfs_init(void)
diff --git a/components/dfs/include/dfs_fs.h b/components/dfs/include/dfs_fs.h
index 828f15a0f5..3d194515df 100644
--- a/components/dfs/include/dfs_fs.h
+++ b/components/dfs/include/dfs_fs.h
@@ -15,7 +15,7 @@
#ifdef RT_USING_LIBC
#include <sys/types.h>
#endif
-
+#include <sys/errno.h>
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/components/dfs/src/dfs_file.c b/components/dfs/src/dfs_file.c
index 802311b54e..fa0f6000b4 100644
--- a/components/dfs/src/dfs_file.c
+++ b/components/dfs/src/dfs_file.c
@@ -157,7 +157,7 @@ int dfs_file_ioctl(struct dfs_fd *fd, int cmd, void *args)
return -EINVAL;
/* regular file system fd */
- if (fd->type == FT_REGULAR || fd->type == FT_DEVICE)
+ if (fd->type == FT_REGULAR)
{
switch (cmd)
{