[components][dfs]添加ftruncate接口

This commit is contained in:
zhangjun
2019-09-26 10:22:33 +08:00
parent 2a39e59024
commit 60f2ae4d3c
5 changed files with 105 additions and 0 deletions

View File

@@ -66,6 +66,10 @@ int dfs_file_lseek(struct dfs_fd *fd, off_t offset);
int dfs_file_stat(const char *path, struct stat *buf);
int dfs_file_rename(const char *oldpath, const char *newpath);
int dfs_file_ftruncate(struct dfs_fd *fd, off_t length);
/* 0x5254 is just a magic number to make these relatively unique ("RT") */
#define RT_FIOFTRUNCATE 0x52540000U
#ifdef __cplusplus
}

View File

@@ -58,6 +58,7 @@ int fstat(int fildes, struct stat *buf);
int fsync(int fildes);
int fcntl(int fildes, int cmd, ...);
int ioctl(int fildes, int cmd, ...);
int ftruncate(int fd, off_t length);
/* directory api*/
int rmdir(const char *path);