diff options
| author | Bernard Xiong <[email protected]> | 2015-12-22 10:18:36 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2015-12-22 10:18:36 +0800 |
| commit | 455daf8e7aa277ad8009c3151b308a176a5476b5 (patch) | |
| tree | 3d73c34dc5615e8c94c3756e9ae5440bdf808de2 /components/dfs/include | |
| parent | 74def7ed7293edbf7fb3042dd3190da6f263fca2 (diff) | |
Add ioctl API and fix the read/write conflict issue with newlib's API.
Diffstat (limited to 'components/dfs/include')
| -rw-r--r-- | components/dfs/include/dfs_posix.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/components/dfs/include/dfs_posix.h b/components/dfs/include/dfs_posix.h index 2d08ec71fa..f3da7b5530 100644 --- a/components/dfs/include/dfs_posix.h +++ b/components/dfs/include/dfs_posix.h @@ -119,20 +119,29 @@ struct stat; /* file api*/ int open(const char *file, int flags, int mode); int close(int d); +#ifdef RT_USING_NEWLIB +_READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte)); +_READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte)); +#else int read(int fd, void *buf, size_t len); int write(int fd, const void *buf, size_t len); +#endif off_t lseek(int fd, off_t offset, int whence); int rename(const char *from, const char *to); int unlink(const char *pathname); int stat(const char *file, struct stat *buf); int fstat(int fildes, struct stat *buf); -int statfs(const char *path, struct statfs *buf); +int fsync(int fildes); +int ioctl(int fildes, unsigned long cmd, void *data); /* directory api*/ int rmdir(const char *path); int chdir(const char *path); char *getcwd(char *buf, size_t size); +/* file system api */ +int statfs(const char *path, struct statfs *buf); + #ifdef __cplusplus } #endif |
