|
PatchworkOS
|
#include <kernel/fs/vfs_ctx.h>#include <kernel/fs/vfs.h>#include <kernel/log/log.h>#include <kernel/sched/thread.h>#include <assert.h>#include <string.h>#include <sys/io.h>Go to the source code of this file.
Functions | |
| void | vfs_ctx_init (vfs_ctx_t *ctx, const path_t *cwd) |
| Initialize a VFS context. | |
| void | vfs_ctx_deinit (vfs_ctx_t *ctx) |
| Deinitialize a VFS context. | |
| file_t * | vfs_ctx_get_file (vfs_ctx_t *ctx, fd_t fd) |
| Get a file from a VFS context. | |
| uint64_t | vfs_ctx_get_cwd (vfs_ctx_t *ctx, path_t *outCwd) |
| uint64_t | vfs_ctx_set_cwd (vfs_ctx_t *ctx, const path_t *cwd) |
| Set the current working directory of a VFS context. | |
| SYSCALL_DEFINE (SYS_CHDIR, uint64_t, const char *pathString) | |
| fd_t | vfs_ctx_alloc_fd (vfs_ctx_t *ctx, file_t *file) |
| Allocate a new file descriptor in a VFS context. | |
| fd_t | vfs_ctx_set_fd (vfs_ctx_t *ctx, fd_t fd, file_t *file) |
| Allocate a specific file descriptor in a VFS context. | |
| uint64_t | vfs_ctx_free_fd (vfs_ctx_t *ctx, fd_t fd) |
| Free a file descriptor in a VFS context. | |
| SYSCALL_DEFINE (SYS_CLOSE, uint64_t, fd_t fd) | |
| fd_t | vfs_ctx_dup (vfs_ctx_t *ctx, fd_t oldFd) |
| Duplicate a file descriptor in a VFS context. | |
| SYSCALL_DEFINE (SYS_DUP, uint64_t, fd_t oldFd) | |
| fd_t | vfs_ctx_dup2 (vfs_ctx_t *ctx, fd_t oldFd, fd_t newFd) |
| Duplicate a file descriptor in a VFS context to a specific file descriptor. | |
| SYSCALL_DEFINE (SYS_DUP2, uint64_t, fd_t oldFd, fd_t newFd) | |
Definition at line 121 of file vfs_ctx.c.
References ERR, PATH_DEFER, PATH_EMPTY, thread_t::process, sched_thread(), thread_copy_from_user_pathname(), vfs_ctx_set_cwd(), vfs_walk(), process_t::vfsCtx, and WALK_NONE.
Definition at line 213 of file vfs_ctx.c.
References sched_process(), and vfs_ctx_free_fd().
Definition at line 246 of file vfs_ctx.c.
References sched_process(), and vfs_ctx_dup().
Definition at line 283 of file vfs_ctx.c.
References sched_process(), and vfs_ctx_dup2().