24#define STDOUT_FILENO 1
25#define STDERR_FILENO 2
43 ssize_t (*
read)(
struct dfs_file *file,
void *buf,
size_t count, off_t *pos);
44 ssize_t (*
write)(
struct dfs_file *file,
const void *buf,
size_t count, off_t *pos);
84#define DFS_FD_MAGIC 0xfdfd
104#define DFS_FILE_POS(dfs_file) ((dfs_file)->fpos)
107#define FMODE_READ 0x1
109#define FMODE_WRITE 0x2
111#define FMODE_LSEEK 0x4
113#define FMODE_PREAD 0x8
115#define FMODE_PWRITE 0x10
117#define FMODE_EXEC 0x20
119#define FMODE_NDELAY 0x40
121#define FMODE_EXCL 0x80
182int dfs_file_mmap2(
struct dfs_file *file,
struct dfs_mmap2_args *mmap2);
188#define RT_FIOFTRUNCATE 0x52540000U
189#define RT_FIOGETADDR 0x52540001U
190#define RT_FIOMMAP2 0x52540002U
193#define DFS_REALPATH_EXCEPT_LAST 0
194#define DFS_REALPATH_EXCEPT_NONE 1
195#define DFS_REALPATH_ONLY_LAST 3
int dfs_vnode_destroy(struct dfs_vnode *vnode)
int dfs_file_open(struct dfs_file *file, const char *path, int flags, mode_t mode)
int dfs_file_getdents(struct dfs_file *file, struct dirent *dirp, size_t nbytes)
int dfs_file_lstat(const char *path, struct stat *buf)
int dfs_file_access(const char *path, mode_t mode)
void dfs_vnode_unref(struct dfs_vnode *vnode)
int dfs_file_symlink(const char *oldname, const char *name)
int dfs_vnode_init(struct dfs_vnode *vnode, int type, const struct dfs_file_ops *fops)
off_t dfs_file_get_fpos(struct dfs_file *file)
int dfs_file_unlink(const char *path)
int dfs_file_ftruncate(struct dfs_file *file, off_t length)
char * dfs_file_getcwd(char *buf, size_t size)
void dfs_file_init(struct dfs_file *file)
ssize_t dfs_file_pwrite(struct dfs_file *file, const void *buf, size_t len, off_t offset)
off_t dfs_file_lseek(struct dfs_file *file, off_t offset, int wherece)
int dfs_file_setattr(const char *path, struct dfs_attr *attr)
int dfs_file_ioctl(struct dfs_file *file, int cmd, void *args)
ssize_t dfs_file_read(struct dfs_file *file, void *buf, size_t len)
ssize_t dfs_file_pread(struct dfs_file *file, void *buf, size_t len, off_t offset)
int dfs_file_fsync(struct dfs_file *file)
struct dfs_vnode * dfs_vnode_create(void)
int dfs_file_fcntl(int fd, int cmd, unsigned long arg)
int dfs_file_chdir(const char *path)
int dfs_file_mkdir(const char *path, mode_t mode)
int dfs_file_isdir(const char *path)
int dfs_file_close(struct dfs_file *file)
int dfs_file_rmdir(const char *pathname)
off_t generic_dfs_lseek(struct dfs_file *file, off_t offset, int whence)
char * dfs_file_realpath(struct dfs_mnt **mnt, const char *fullpath, int mode)
int dfs_file_readlink(const char *path, char *buf, int bufsize)
void dfs_file_set_fpos(struct dfs_file *file, off_t fpos)
void dfs_file_deinit(struct dfs_file *file)
int dfs_file_stat(const char *path, struct stat *buf)
int dfs_file_rename(const char *old_file, const char *new_file)
struct dfs_vnode * dfs_vnode_ref(struct dfs_vnode *vnode)
int dfs_file_link(const char *oldname, const char *newname)
ssize_t dfs_file_write(struct dfs_file *file, const void *buf, size_t len)
int dfs_file_fstat(struct dfs_file *file, struct stat *buf)
int dfs_file_mmap(struct dfs_file *file, struct dfs_mmap2_args *mmap2)
int stat(const char *file, struct stat *buf)
int(* truncate)(struct dfs_file *file, off_t offset)
int(* flock)(struct dfs_file *file, int, struct file_lock *flock)
ssize_t(* write)(struct dfs_file *file, const void *buf, size_t count, off_t *pos)
int(* mmap)(struct dfs_file *file, struct lwp_avl_struct *mmap)
off_t(* lseek)(struct dfs_file *file, off_t offset, int wherece)
int(* flush)(struct dfs_file *file)
ssize_t(* read)(struct dfs_file *file, void *buf, size_t count, off_t *pos)
int(* ioctl)(struct dfs_file *file, int cmd, void *arg)
int(* open)(struct dfs_file *file)
int(* close)(struct dfs_file *file)
int(* poll)(struct dfs_file *file, struct rt_pollreq *req)
int(* getdents)(struct dfs_file *file, struct dirent *dirp, uint32_t count)
int(* lock)(struct dfs_file *file, struct file_lock *flock)
struct dfs_dentry * dentry
const struct dfs_file_ops * fops
struct dfs_aspace * aspace
const struct dfs_file_ops * fops