Home
last modified time | relevance | path

Searched refs:vfs_file_t (Results 1 – 15 of 15) sorted by relevance

/DragonOS-0.1.3/kernel/src/driver/tty/
Dtty.c15 long tty_open(struct vfs_index_node_t *inode, struct vfs_file_t *filp) in tty_open()
28 long tty_close(struct vfs_index_node_t *inode, struct vfs_file_t *filp) in tty_close()
43 long tty_ioctl(struct vfs_index_node_t *inode, struct vfs_file_t *filp, uint64_t cmd, uint64_t arg) in tty_ioctl()
62 long tty_read(struct vfs_file_t *filp, char *buf, int64_t count, long *position) in tty_read()
76 long tty_write(struct vfs_file_t *filp, char *buf, int64_t count, long *position) in tty_write()
/DragonOS-0.1.3/kernel/src/ipc/
Dpipe.c30 long pipe_read(struct vfs_file_t *file_ptr, char *buf, in pipe_read()
63 long pipe_write(struct vfs_file_t *file_ptr, char *buf, in pipe_write()
97 long pipe_close(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) in pipe_close()
139 struct vfs_file_t *read_file = NULL; in sys_pipe()
140 struct vfs_file_t *write_file = NULL; in sys_pipe()
147 read_file = (struct vfs_file_t *)kzalloc(sizeof(struct vfs_file_t), 0); in sys_pipe()
156 write_file = (struct vfs_file_t *)kzalloc(sizeof(struct vfs_file_t), 0); in sys_pipe()
/DragonOS-0.1.3/kernel/src/filesystem/vfs/
DVFS.h102 struct vfs_file_t struct
186 long (*open)(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr);
187 long (*close)(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr);
188 long (*read)(struct vfs_file_t *file_ptr, char *buf, int64_t count, long *position);
189 long (*write)(struct vfs_file_t *file_ptr, char *buf, int64_t count, long *position);
190 long (*lseek)(struct vfs_file_t *file_ptr, long offset, long origin);
191 …long (*ioctl)(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr, uint64_t cmd, uint64_t …
193 long (*readdir)(struct vfs_file_t *file_ptr, void *dirent, vfs_filldir_t filler); // 读取文件夹
DVFS.c494 struct vfs_file_t *file_ptr = (struct vfs_file_t *)kzalloc(sizeof(struct vfs_file_t), 0); in do_open()
556 struct vfs_file_t *file_ptr = current_pcb->fds[fd_num]; in vfs_close()
/DragonOS-0.1.3/kernel/src/driver/keyboard/
Dps2_keyboard.c49 long ps2_keyboard_open(struct vfs_index_node_t *inode, struct vfs_file_t *filp) in ps2_keyboard_open()
63 long ps2_keyboard_close(struct vfs_index_node_t *inode, struct vfs_file_t *filp) in ps2_keyboard_close()
79 long ps2_keyboard_ioctl(struct vfs_index_node_t *inode, struct vfs_file_t *filp, uint64_t cmd, uint… in ps2_keyboard_ioctl()
102 long ps2_keyboard_read(struct vfs_file_t *filp, char *buf, int64_t count, long *position) in ps2_keyboard_read()
121 long ps2_keyboard_write(struct vfs_file_t *filp, char *buf, int64_t count, long *position) in ps2_keyboard_write()
/DragonOS-0.1.3/kernel/src/filesystem/rootfs/
Drootfs.c41 static long rootfs_open(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) in rootfs_open()
45 static long rootfs_close(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) { return 0; } in rootfs_close()
46 static long rootfs_read(struct vfs_file_t *file_ptr, char *buf, int64_t count, long *position) { re… in rootfs_read()
47 static long rootfs_write(struct vfs_file_t *file_ptr, char *buf, int64_t count, long *position) { r… in rootfs_write()
48 static long rootfs_lseek(struct vfs_file_t *file_ptr, long offset, long origin) { return 0; } in rootfs_lseek()
49 static long rootfs_ioctl(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr, uint64_t cmd,… in rootfs_ioctl()
51 static long rootfs_readdir(struct vfs_file_t *file_ptr, void *dirent, vfs_filldir_t filler) in rootfs_readdir()
/DragonOS-0.1.3/kernel/src/filesystem/devfs/
Ddevfs.c74 static long devfs_open(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) in devfs_open()
78 static long devfs_close(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) { return 0; } in devfs_close()
79 static long devfs_read(struct vfs_file_t *file_ptr, char *buf, int64_t count, long *position) { ret… in devfs_read()
80 static long devfs_write(struct vfs_file_t *file_ptr, char *buf, int64_t count, long *position) { re… in devfs_write()
81 static long devfs_lseek(struct vfs_file_t *file_ptr, long offset, long origin) { return 0; } in devfs_lseek()
82 static long devfs_ioctl(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr, uint64_t cmd, … in devfs_ioctl()
84 static long devfs_readdir(struct vfs_file_t *file_ptr, void *dirent, vfs_filldir_t filler) in devfs_readdir()
/DragonOS-0.1.3/kernel/src/filesystem/procfs/
Dprocfs.c105 static long procfs_open(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) in procfs_open()
171 static long procfs_close(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) in procfs_close()
175 static long procfs_read(struct vfs_file_t *file_ptr, char *buf, int64_t count, long *position) in procfs_read()
218 static long procfs_write(struct vfs_file_t *file_ptr, char *buf, int64_t count, long *position) in procfs_write()
230 static long procfs_lseek(struct vfs_file_t *file_ptr, long offset, long whence) in procfs_lseek()
258 static long procfs_ioctl(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr, uint64_t cmd,… in procfs_ioctl()
272 static long procfs_readdir(struct vfs_file_t *file_ptr, void *dirent, vfs_filldir_t filler) in procfs_readdir()
/DragonOS-0.1.3/kernel/src/process/
Dprocess.c144 struct vfs_file_t *process_open_exec_file(char *path) in process_open_exec_file()
147 struct vfs_file_t *filp = NULL; in process_open_exec_file()
157 filp = (struct vfs_file_t *)kmalloc(sizeof(struct vfs_file_t), 0); in process_open_exec_file()
180 struct vfs_file_t *filp = process_open_exec_file(path); in process_load_elf_file()
747 memset(pcb->fds, 0, sizeof(struct vfs_file_t *) * PROC_MAX_FD_NUM); in process_exit_files()
851 int process_fd_alloc(struct vfs_file_t *file) in process_fd_alloc()
Dproc-types.h111 struct vfs_file_t *fds[PROC_MAX_FD_NUM];
Dprocess.h159 int process_fd_alloc(struct vfs_file_t *file);
Dfork.c199 pcb->fds[i] = (struct vfs_file_t *)kmalloc(sizeof(struct vfs_file_t), 0); in process_copy_files()
200 memcpy(pcb->fds[i], current_pcb->fds[i], sizeof(struct vfs_file_t)); in process_copy_files()
/DragonOS-0.1.3/kernel/src/syscall/
Dsyscall.c188 struct vfs_file_t *file_ptr = current_pcb->fds[fd_num]; in sys_read()
241 struct vfs_file_t *file_ptr = current_pcb->fds[fd_num]; in sys_write()
274 struct vfs_file_t *file_ptr = current_pcb->fds[fd_num]; in sys_lseek()
464 struct vfs_file_t *filp = current_pcb->fds[fd]; in sys_getdents()
/DragonOS-0.1.3/kernel/src/filesystem/fat32/
Dfat32.h221 int64_t fat32_readdir(struct vfs_file_t *file_ptr, void *dirent, vfs_filldir_t filler);
Dfat32.c553 long fat32_open(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) in fat32_open()
559 long fat32_close(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr) in fat32_close()
573 long fat32_read(struct vfs_file_t *file_ptr, char *buf, int64_t count, long *position) in fat32_read()
662 long fat32_write(struct vfs_file_t *file_ptr, char *buf, int64_t count, long *position) in fat32_write()
793 long fat32_lseek(struct vfs_file_t *file_ptr, long offset, long whence) in fat32_lseek()
823 long fat32_ioctl(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr, uint64_t cmd, uint64_… in fat32_ioctl()
1157 int64_t fat32_readdir(struct vfs_file_t *file_ptr, void *dirent, vfs_filldir_t filler) in fat32_readdir()