rt_file.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /******************************************************************************
  2. 版权所有:
  3. 文件名称: rt_file.h
  4. 文件版本: 01.01
  5. 创建作者: sunxi
  6. 创建日期: 2020-06-18
  7. 功能说明: 实时微系统文件系统接口
  8. 其它说明:
  9. 修改记录:
  10. */
  11. #ifndef _RT_FILE_H
  12. #define _RT_FILE_H
  13. /*------------------------------- 头文件 --------------------------------------
  14. */
  15. #include "rt.h"
  16. /*------------------------------- 宏定义 --------------------------------------
  17. */
  18. #define IS_ERR(x) (((int)x < 0) ? 1 : 0)
  19. #define UMH_WAIT_PROC 0
  20. #define UMH_NO_WAIT 1
  21. /*------------------------------ 类型结构 -------------------------------------
  22. */
  23. /*------------------------------ 函数声明 -------------------------------------
  24. */
  25. int rt_file_open(const char *filename, int flags, int mode);
  26. int rt_file_close(int fd, int id);
  27. int rt_file_llseek(int fd, long offset, int origin);
  28. int rt_file_read(int fd, char *buf, size_t count, off_t *pos);
  29. int rt_file_write(int fd, const char *buf, size_t count, off_t *pos);
  30. int rt_file_getfile_size(int fd);
  31. int rt_file_cp(char *src,char *dst);
  32. int rt_file_mv(char *src,char *dst);
  33. int rt_file_del(char *pathname);
  34. int rt_file_mkdir(char *dir);
  35. int rt_file_ln(char *src, char *dst);
  36. int rt_rootfs_version(char *pathname);
  37. int rt_kernel_version(char *pathname);
  38. int rt_printenv_version(char *pathname);
  39. int rt_rootfs_version1(char *pathname,char *pathname1,char *pathname2);
  40. int call_usermodehelper(char *cmd, char *cmd_and_argv[], char *envp[], int flag);
  41. #endif //_RT_FILE_H
  42. /*------------------------------ 文件结束 -------------------------------------
  43. */