《操作系统》的实验代码。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
564 B

12 years ago
  1. #ifndef __USER_LIBS_FILE_H__
  2. #define __USER_LIBS_FILE_H__
  3. #include <defs.h>
  4. struct stat;
  5. int open(const char *path, uint32_t open_flags);
  6. int close(int fd);
  7. int read(int fd, void *base, size_t len);
  8. int write(int fd, void *base, size_t len);
  9. int seek(int fd, off_t pos, int whence);
  10. int fstat(int fd, struct stat *stat);
  11. int fsync(int fd);
  12. int dup(int fd);
  13. int dup2(int fd1, int fd2);
  14. int pipe(int *fd_store);
  15. int mkfifo(const char *name, uint32_t open_flags);
  16. void print_stat(const char *name, int fd, struct stat *stat);
  17. #endif /* !__USER_LIBS_FILE_H__ */