《操作系统》的实验代码。
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

#ifndef __USER_LIBS_FILE_H__
#define __USER_LIBS_FILE_H__
#include <defs.h>
struct stat;
int open(const char *path, uint32_t open_flags);
int close(int fd);
int read(int fd, void *base, size_t len);
int write(int fd, void *base, size_t len);
int seek(int fd, off_t pos, int whence);
int fstat(int fd, struct stat *stat);
int fsync(int fd);
int dup(int fd);
int dup2(int fd1, int fd2);
int pipe(int *fd_store);
int mkfifo(const char *name, uint32_t open_flags);
void print_stat(const char *name, int fd, struct stat *stat);
#endif /* !__USER_LIBS_FILE_H__ */