From 2c525ecd43cfee01cffd4d1d289ebdb5935674a5 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sat, 11 Sep 2021 15:34:59 -0400 Subject: 将dfs_posix.h的函数声明转移到unix标准头文件中 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/compilers/common/sys/statfs.h | 15 +++++++++------ components/libc/compilers/common/sys/vfs.h | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 components/libc/compilers/common/sys/vfs.h (limited to 'components/libc/compilers/common/sys') 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 +#include 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" /* */ + +#endif -- cgit v1.3.1