dfs_raw.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. +------------------------------------------------------------------------------
  3. | Project : Device Filesystem
  4. +------------------------------------------------------------------------------
  5. | Copyright 2004, 2005 www.fayfayspace.org.
  6. | All rights reserved.
  7. |------------------------------------------------------------------------------
  8. | File : dfs_raw.h, the raw APIs of Device FileSystem
  9. |------------------------------------------------------------------------------
  10. | Chang Logs:
  11. | Date Author Notes
  12. | 2005-01-26 ffxz The first version
  13. +------------------------------------------------------------------------------
  14. */
  15. #ifndef __DFS_RAW_H__
  16. #define __DFS_RAW_H__
  17. #include <dfs_def.h>
  18. #include <dfs_fs.h>
  19. int dfile_raw_open(struct dfs_fd* fd, const char *path, int flags);
  20. int dfile_raw_close(struct dfs_fd* fd);
  21. int dfile_raw_ioctl(struct dfs_fd* fd, int cmd, void *args);
  22. int dfile_raw_read(struct dfs_fd* fd, void *buf, rt_size_t len);
  23. int dfile_raw_getdents(struct dfs_fd* fd, struct dfs_dirent* dirp, rt_size_t nbytes);
  24. int dfile_raw_unlink(const char *path);
  25. int dfile_raw_write(struct dfs_fd* fd, const void *buf, rt_size_t len);
  26. int dfile_raw_lseek(struct dfs_fd* fd, rt_off_t offset);
  27. int dfile_raw_stat(const char *path, struct dfs_stat *buf);
  28. int dfile_raw_rename(const char* oldpath, const char* newpath);
  29. /* FD APIs */
  30. int fd_new(void);
  31. struct dfs_fd* fd_get(int fd);
  32. void fd_put(struct dfs_fd* fd);
  33. #endif