VFS.h 702 B

1234567891011121314151617181920212223242526272829
  1. /**
  2. * @file VFS.h
  3. * @author fslongjin ([email protected])
  4. * @brief 虚拟文件系统
  5. * @version 0.1
  6. * @date 2022-04-20
  7. *
  8. * @copyright Copyright (c) 2022
  9. *
  10. */
  11. #pragma once
  12. struct vfs_file_operations_t
  13. {
  14. long (*open)(void *not_used, void *not_used1);
  15. long (*close)(void *not_used, void *not_used1);
  16. long (*read)(void *not_used1, char *buf, int64_t count, long *position);
  17. long (*write)(void *not_used1, char *buf, int64_t count, long *position);
  18. long (*lseek)(void *not_used1, long offset, long origin);
  19. long (*ioctl)(void *not_used, void *not_used1, uint64_t cmd, uint64_t arg);
  20. };
  21. /**
  22. * @brief 初始化vfs
  23. *
  24. * @return int 错误码
  25. */
  26. extern int vfs_init();