dfs_uffs.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #include <rtthread.h>
  2. #include <dfs.h>
  3. #include <dfs_fs.h>
  4. /* mount and unmount file system */
  5. static int dfs_uffs_mount(struct dfs_filesystem* fs, unsigned long rwflag, const void* data)
  6. {
  7. }
  8. static int dfs_uffs_unmount(struct dfs_filesystem* fs)
  9. {
  10. }
  11. static int dfs_uffs_mkfs(const char* device_name)
  12. {
  13. return -DFS_STATUS_EIO;
  14. }
  15. static int dfs_uffs_statfs(struct dfs_filesystem* fs, struct _statfs *buf)
  16. {
  17. }
  18. static int dfs_uffs_open(struct dfs_fd* fd)
  19. {
  20. }
  21. static int dfs_uffs_close(struct dfs_fd* fd)
  22. {
  23. }
  24. static int dfs_uffs_ioctl(struct dfs_fd* fd, int cmd, void *args)
  25. {
  26. }
  27. static int dfs_uffs_read(struct dfs_fd* fd, void* buf, rt_size_t count)
  28. {
  29. }
  30. static int dfs_uffs_write(struct dfs_fd* fd, const void* buf, rt_size_t count)
  31. {
  32. }
  33. static int dfs_uffs_flush(struct dfs_fd* fd)
  34. {
  35. }
  36. static int dfs_uffs_lseek(struct dfs_fd* fd, rt_off_t offset)
  37. {
  38. }
  39. static int dfs_uffs_getdents(struct dfs_fd* fd, struct _dirent* dirp, rt_uint32_t count)
  40. {
  41. }
  42. static int dfs_uffs_unlink(struct dfs_filesystem* fs, const char* pathname)
  43. {
  44. }
  45. static int dfs_uffs_stat(struct dfs_filesystem* fs, const char* filename, struct _stat* buf)
  46. {
  47. }
  48. static int dfs_uffs_rename(struct dfs_filesystem* fs, const char* oldpath, const char* newpath)
  49. {
  50. }
  51. static const struct dfs_filesystem_operation _uffs =
  52. {
  53. "uffs",
  54. dfs_uffs_mount,
  55. dfs_uffs_unmount,
  56. dfs_uffs_mkfs,
  57. dfs_uffs_statfs,
  58. dfs_uffs_open,
  59. dfs_uffs_close,
  60. dfs_uffs_ioctl,
  61. dfs_uffs_read,
  62. dfs_uffs_write,
  63. dfs_uffs_flush,
  64. dfs_uffs_lseek,
  65. dfs_uffs_getdents,
  66. dfs_uffs_unlink,
  67. dfs_uffs_stat,
  68. dfs_uffs_rename,
  69. };
  70. int dfs_uffs_init(void)
  71. {
  72. /* register UFFS file system */
  73. return dfs_register(&_uffs);
  74. }