diff options
| author | Meco Man <[email protected]> | 2021-09-11 15:34:59 -0400 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-09-11 15:42:37 -0400 |
| commit | 2c525ecd43cfee01cffd4d1d289ebdb5935674a5 (patch) | |
| tree | 11d51f72e0f88e8c3870cd4b387371737340e43f /components/libc/compilers/common/sys | |
| parent | ee55c58ce43cf2405481db11df187af3aff74eb4 (diff) | |
将dfs_posix.h的函数声明转移到unix标准头文件中
Diffstat (limited to 'components/libc/compilers/common/sys')
| -rw-r--r-- | components/libc/compilers/common/sys/statfs.h | 15 | ||||
| -rw-r--r-- | components/libc/compilers/common/sys/vfs.h | 15 |
2 files changed, 24 insertions, 6 deletions
diff --git a/components/libc/compilers/common/sys/statfs.h b/components/libc/compilers/common/sys/statfs.h index 0996af9a18..0c6dc44df3 100644 --- a/components/libc/compilers/common/sys/statfs.h +++ b/components/libc/compilers/common/sys/statfs.h @@ -6,16 +6,19 @@ * Change Logs: * Date Author Notes */ -#ifndef __RTT_STATFS_H__ -#define __RTT_STATFS_H__ +#ifndef __SYS_STATFS_H__ +#define __SYS_STATFS_H__ -#include <rtthread.h> +#include <stddef.h> struct statfs { - rt_size_t f_bsize; /* block size */ - rt_size_t f_blocks; /* total data blocks in file system */ - rt_size_t f_bfree; /* free blocks in file system */ + size_t f_bsize; /* block size */ + size_t f_blocks; /* total data blocks in file system */ + size_t f_bfree; /* free blocks in file system */ }; +int statfs(const char *path, struct statfs *buf); +int fstatfs(int fd, struct statfs *buf); + #endif diff --git a/components/libc/compilers/common/sys/vfs.h b/components/libc/compilers/common/sys/vfs.h new file mode 100644 index 0000000000..00739ab1c6 --- /dev/null +++ b/components/libc/compilers/common/sys/vfs.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2021-09-11 Meco Man First version + */ +#ifndef __SYS_VFS_H__ +#define __SYS_VFS_H__ + +#include "statfs.h" /* <sys/statfs.h> */ + +#endif |
