sys_fs.h 717 B

1234567891011121314151617181920
  1. /* File-service syscalls (see sys_fs.c); used by syscall.c and the scheduler. */
  2. #ifndef SYS_FS_H
  3. #define SYS_FS_H
  4. #include "syscall.h"
  5. /* Enter/leave the fs non-preemptible section (used by other disk-touching
  6. * services, e.g. the storage info refresh). See sys_fs.c. */
  7. void sys_fs_enter(void);
  8. void sys_fs_exit(void);
  9. int sys_read_file(const char *path, void *buf, unsigned int max);
  10. int sys_write_file(const char *path, const void *buf, unsigned int len);
  11. int sys_unlink(const char *path);
  12. int sys_mkdir(const char *path);
  13. int sys_rmdir(const char *path);
  14. int sys_list_dir(const char *path, unsigned int index, struct sys_dirent *out);
  15. int sys_list_mounts(unsigned int index, struct sys_mount *out);
  16. #endif