diff options
| author | Wayne <[email protected]> | 2021-11-15 11:28:34 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-11-15 11:28:34 +0800 |
| commit | 17cbdda13da4b4ca7643ad729b2ba1b138009fd3 (patch) | |
| tree | 685fc3f6ce9d42aff6230f534745152519e76ff5 /components/dfs | |
| parent | c07b2b0a07a25b6bdecaacef9ad229fbd5f3fd37 (diff) | |
| parent | 5711b0a76b8d80ab2dc4cdbf925a7b48f4140a5d (diff) | |
Merge branch 'RT-Thread:master' into nuvoton
Diffstat (limited to 'components/dfs')
| -rw-r--r-- | components/dfs/Kconfig | 2 | ||||
| -rw-r--r-- | components/dfs/include/dfs_fs.h | 3 | ||||
| -rw-r--r-- | components/dfs/src/dfs.c | 8 |
3 files changed, 6 insertions, 7 deletions
diff --git a/components/dfs/Kconfig b/components/dfs/Kconfig index 7a4fbb655d..1ec36784d7 100644 --- a/components/dfs/Kconfig +++ b/components/dfs/Kconfig @@ -133,7 +133,7 @@ if RT_USING_DFS config RT_USING_DFS_DEVFS bool "Using devfs for device objects" - default y + default n config RT_USING_DFS_ROMFS bool "Enable ReadOnly file system on flash" diff --git a/components/dfs/include/dfs_fs.h b/components/dfs/include/dfs_fs.h index 3d194515df..0a13040c21 100644 --- a/components/dfs/include/dfs_fs.h +++ b/components/dfs/include/dfs_fs.h @@ -12,10 +12,9 @@ #define __DFS_FS_H__ #include <dfs.h> -#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.c b/components/dfs/src/dfs.c index ed8d8094aa..29b2068a6c 100644 --- a/components/dfs/src/dfs.c +++ b/components/dfs/src/dfs.c @@ -18,9 +18,9 @@ #include <lwp.h> #endif -#ifdef RT_USING_POSIX +#ifdef RT_USING_POSIX_STDIO #include <libc.h> -#endif /* RT_USING_POSIX */ +#endif /* RT_USING_POSIX_STDIO */ /* Global variables */ const struct dfs_filesystem_ops *filesystem_operation_table[DFS_FILESYSTEM_TYPES_MAX]; @@ -216,10 +216,10 @@ struct dfs_fd *fd_get(int fd) struct dfs_fd *d; struct dfs_fdtable *fdt; -#ifdef RT_USING_POSIX +#ifdef RT_USING_POSIX_STDIO if ((0 <= fd) && (fd <= 2)) fd = libc_stdio_get_console(); -#endif /* RT_USING_POSIX */ +#endif /* RT_USING_POSIX_STDIO */ fdt = dfs_fdtable_get(); fd = fd - DFS_FD_OFFSET; |
