diff options
| author | Meco Man <[email protected]> | 2021-09-01 09:28:16 -0400 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-09-01 09:28:16 -0400 |
| commit | dd9db58a865775a0756d1b1ce4f1ef021542f54b (patch) | |
| tree | af9ec8d2286e4a5ac9666db9f380cba89d845603 /components | |
| parent | aab382c32ed0fb795d12191c7a59265f574e8466 (diff) | |
优化dfs.h和dirent.h的包含关系
Diffstat (limited to 'components')
| -rw-r--r-- | components/dfs/include/dfs.h | 10 | ||||
| -rw-r--r-- | components/libc/compilers/common/dirent.h | 4 |
2 files changed, 4 insertions, 10 deletions
diff --git a/components/dfs/include/dfs.h b/components/dfs/include/dfs.h index 6af8bbd99f..0fd8c2dccc 100644 --- a/components/dfs/include/dfs.h +++ b/components/dfs/include/dfs.h @@ -15,7 +15,7 @@ #include <stdint.h> #include <stdlib.h> #include <string.h> - +#include <dirent.h> #include <sys/time.h> #include <rtdevice.h> @@ -24,11 +24,11 @@ extern "C" { #endif #ifndef DFS_FILESYSTEMS_MAX -#define DFS_FILESYSTEMS_MAX 2 +#define DFS_FILESYSTEMS_MAX 4 #endif #ifndef DFS_FD_MAX -#define DFS_FD_MAX 4 +#define DFS_FD_MAX 16 #endif /* @@ -39,7 +39,7 @@ extern "C" { #endif #ifndef DFS_PATH_MAX -#define DFS_PATH_MAX 256 +#define DFS_PATH_MAX DIRENT_NAME_MAX #endif #ifndef SECTOR_SIZE @@ -66,8 +66,6 @@ extern "C" { #define DFS_F_EOF 0x04000000 #define DFS_F_ERR 0x08000000 -#include <dirent.h> - struct statfs { size_t f_bsize; /* block size */ diff --git a/components/libc/compilers/common/dirent.h b/components/libc/compilers/common/dirent.h index 6727d96788..a6353fd6f8 100644 --- a/components/libc/compilers/common/dirent.h +++ b/components/libc/compilers/common/dirent.h @@ -44,11 +44,7 @@ typedef struct #ifndef HAVE_DIRENT_STRUCTURE #define HAVE_DIRENT_STRUCTURE -#ifdef DFS_PATH_MAX -#define DIRENT_NAME_MAX DFS_PATH_MAX -#else #define DIRENT_NAME_MAX 256 -#endif struct dirent { |
