diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/proc.h | 2 | ||||
-rw-r--r-- | src/kernel/syscalls.c | 2 | ||||
-rw-r--r-- | src/kernel/vfs/request.c | 2 | ||||
-rw-r--r-- | src/shared/include/camellia/syscalls.h | 2 | ||||
-rw-r--r-- | src/shared/include/camellia/types.h | 2 | ||||
-rw-r--r-- | src/user/app/init/driver/initctl.c | 2 | ||||
-rw-r--r-- | src/user/app/init/driver/ps2.c | 2 | ||||
-rw-r--r-- | src/user/app/login/login.c | 2 | ||||
-rw-r--r-- | src/user/app/netstack/fs.c | 2 | ||||
-rw-r--r-- | src/user/app/tests/kernel/fs.c | 2 | ||||
-rw-r--r-- | src/user/app/tests/kernel/path.c | 2 | ||||
-rw-r--r-- | src/user/app/tmpfs/tmpfs.c | 4 | ||||
-rw-r--r-- | src/user/app/vterm/vterm.c | 2 | ||||
-rw-r--r-- | src/user/bootstrap/tar.c | 6 | ||||
-rw-r--r-- | src/user/lib/compat.c | 2 | ||||
-rw-r--r-- | src/user/lib/compat.h | 2 | ||||
-rw-r--r-- | src/user/lib/fs/misc.c | 8 | ||||
-rw-r--r-- | src/user/lib/syscall.c | 2 |
18 files changed, 24 insertions, 24 deletions
diff --git a/src/kernel/proc.h b/src/kernel/proc.h index 0ae811e..eb39b51 100644 --- a/src/kernel/proc.h +++ b/src/kernel/proc.h @@ -32,7 +32,7 @@ struct process { struct { char __user *buf; size_t max_len; - struct fs_wait_response __user *res; + struct ufs_request __user *res; } awaited_req; // PS_WAITS4REQUEST struct { struct handle *pipe; diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index 62acf5f..aa3c28f 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -258,7 +258,7 @@ long _syscall_close(handle_t hid) { SYSCALL_RETURN(0); } -handle_t _syscall_fs_wait(char __user *buf, long max_len, struct fs_wait_response __user *res) { +handle_t _syscall_fs_wait(char __user *buf, long max_len, struct ufs_request __user *res) { struct vfs_backend *backend = process_current->controlled; // TODO can be used to tell if you're init if (!backend) SYSCALL_RETURN(-1); diff --git a/src/kernel/vfs/request.c b/src/kernel/vfs/request.c index 39834d5..24d5dac 100644 --- a/src/kernel/vfs/request.c +++ b/src/kernel/vfs/request.c @@ -95,7 +95,7 @@ void vfs_backend_tryaccept(struct vfs_backend *backend) { static void vfs_backend_user_accept(struct vfs_request *req) { struct process *handler; - struct fs_wait_response res = {0}; + struct ufs_request res = {0}; struct virt_cpy_error cpyerr; int len; diff --git a/src/shared/include/camellia/syscalls.h b/src/shared/include/camellia/syscalls.h index 2450fff..f9e3832 100644 --- a/src/shared/include/camellia/syscalls.h +++ b/src/shared/include/camellia/syscalls.h @@ -61,7 +61,7 @@ long _syscall_getsize(handle_t h); long _syscall_remove(handle_t h); long _syscall_close(handle_t h); -handle_t _syscall_fs_wait(char __user *buf, long max_len, struct fs_wait_response __user *res); +handle_t _syscall_fs_wait(char __user *buf, long max_len, struct ufs_request __user *res); long _syscall_fs_respond(handle_t hid, const void __user *buf, long ret, int flags); /** Modifies the virtual address space. diff --git a/src/shared/include/camellia/types.h b/src/shared/include/camellia/types.h index 4f6ab1d..be34783 100644 --- a/src/shared/include/camellia/types.h +++ b/src/shared/include/camellia/types.h @@ -22,7 +22,7 @@ enum vfs_operation { VFSOP_CLOSE, }; -struct fs_wait_response { +struct ufs_request { enum vfs_operation op; size_t len; // how much was put in *buf size_t capacity; // how much output can be accepted by the caller diff --git a/src/user/app/init/driver/initctl.c b/src/user/app/init/driver/initctl.c index 7f5fc20..b9fe1c9 100644 --- a/src/user/app/init/driver/initctl.c +++ b/src/user/app/init/driver/initctl.c @@ -7,7 +7,7 @@ #include <user/lib/compat.h> void initctl_drv(handle_t killswitch) { - struct fs_wait_response res; + struct ufs_request res; char buf[64]; const size_t buflen = sizeof buf; while (!c0_fs_wait(buf, buflen, &res)) { diff --git a/src/user/app/init/driver/ps2.c b/src/user/app/init/driver/ps2.c index 0d344ed..5e9aeac 100644 --- a/src/user/app/init/driver/ps2.c +++ b/src/user/app/init/driver/ps2.c @@ -52,7 +52,7 @@ static void parse_scancode(uint8_t s) { static void main_loop(void) { static char buf[512]; - struct fs_wait_response res; + struct ufs_request res; int ret; while (!c0_fs_wait(buf, sizeof buf, &res)) { switch (res.op) { diff --git a/src/user/app/login/login.c b/src/user/app/login/login.c index 70de5b3..15276d4 100644 --- a/src/user/app/login/login.c +++ b/src/user/app/login/login.c @@ -34,7 +34,7 @@ bool segcmp(const char *path, int idx, const char *s2) { } static void drv(const char *user) { - struct fs_wait_response res; + struct ufs_request res; char *buf = malloc(PATH_MAX); while (!c0_fs_wait(buf, PATH_MAX, &res)) { switch (res.op) { diff --git a/src/user/app/netstack/fs.c b/src/user/app/netstack/fs.c index 91e75ef..d8faadf 100644 --- a/src/user/app/netstack/fs.c +++ b/src/user/app/netstack/fs.c @@ -239,7 +239,7 @@ void fs_thread(void *arg) { (void)arg; const size_t buflen = 4096; char *buf = malloc(buflen); for (;;) { - struct fs_wait_response res; + struct ufs_request res; handle_t reqh = _syscall_fs_wait(buf, buflen, &res); if (reqh < 0) break; struct handle *h = res.id; diff --git a/src/user/app/tests/kernel/fs.c b/src/user/app/tests/kernel/fs.c index d11775a..65e349c 100644 --- a/src/user/app/tests/kernel/fs.c +++ b/src/user/app/tests/kernel/fs.c @@ -6,7 +6,7 @@ static void test_unfinished_req(void) { handle_t h; if (_syscall_fork(FORK_NEWFS, &h)) { // TODO make a similar test with all 0s passed to fs_wait - struct fs_wait_response res; + struct ufs_request res; _syscall_fs_wait(NULL, 0, &res); // TODO second fs_wait exit(0); diff --git a/src/user/app/tests/kernel/path.c b/src/user/app/tests/kernel/path.c index ddaf692..fd6eeec 100644 --- a/src/user/app/tests/kernel/path.c +++ b/src/user/app/tests/kernel/path.c @@ -66,7 +66,7 @@ static void test_path_simplify(void) { static void mount_resolve_drv(const char *path) { if (fork2_n_mount(path)) return; - struct fs_wait_response res; + struct ufs_request res; while (!c0_fs_wait(NULL, 0, &res)) { // TODO does the first argument of c0_fs_respond need to be non-const? c0_fs_respond((void*)path, strlen(path), 0); diff --git a/src/user/app/tmpfs/tmpfs.c b/src/user/app/tmpfs/tmpfs.c index 0d3fe36..7614d92 100644 --- a/src/user/app/tmpfs/tmpfs.c +++ b/src/user/app/tmpfs/tmpfs.c @@ -37,7 +37,7 @@ static struct node *lookup(struct node *parent, const char *path, size_t len) { return NULL; } -static struct node *tmpfs_open(const char *path, struct fs_wait_response *res) { +static struct node *tmpfs_open(const char *path, struct ufs_request *res) { /* *path is not null terminated! */ struct node *node = &special_root; if (res->len == 0) return NULL; @@ -103,7 +103,7 @@ static long remove_node(struct node *node) { int main(void) { const size_t buflen = 4096; char *buf = malloc(buflen); - struct fs_wait_response res; + struct ufs_request res; struct node *ptr; while (!c0_fs_wait(buf, buflen, &res)) { switch (res.op) { diff --git a/src/user/app/vterm/vterm.c b/src/user/app/vterm/vterm.c index 102513d..bb60a34 100644 --- a/src/user/app/vterm/vterm.c +++ b/src/user/app/vterm/vterm.c @@ -38,7 +38,7 @@ int main(void) { font_load("/init/font.psf"); static char buf[512]; - struct fs_wait_response res; + struct ufs_request res; while (!c0_fs_wait(buf, sizeof buf, &res)) { switch (res.op) { case VFSOP_OPEN: diff --git a/src/user/bootstrap/tar.c b/src/user/bootstrap/tar.c index 752c86e..2968995 100644 --- a/src/user/bootstrap/tar.c +++ b/src/user/bootstrap/tar.c @@ -14,7 +14,7 @@ static void *tar_open(const char *path, int len, void *base, size_t base_len); static char tar_type(void *meta); static void tar_dirbuild(struct dirbuild *db, const char *meta, void *base, size_t base_len); -static void tar_read(struct fs_wait_response *res, void *base, size_t base_len); +static void tar_read(struct ufs_request *res, void *base, size_t base_len); static int tar_size(void *sector); static int oct_parse(char *str, size_t len); @@ -24,7 +24,7 @@ static const char *root_fakemeta = ""; /* see comment in tar_open */ void tar_driver(void *base) { static char buf[BUF_SIZE]; - struct fs_wait_response res; + struct ufs_request res; void *ptr; while (!c0_fs_wait(buf, BUF_SIZE, &res)) { switch (res.op) { @@ -99,7 +99,7 @@ static void tar_dirbuild(struct dirbuild *db, const char *meta, void *base, size } } -static void tar_read(struct fs_wait_response *res, void *base, size_t base_len) { +static void tar_read(struct ufs_request *res, void *base, size_t base_len) { void *meta = (void*)res->id; static char buf[BUF_SIZE]; // TODO reuse a single buffer for both tar_driver and tar_read diff --git a/src/user/lib/compat.c b/src/user/lib/compat.c index cadc77f..63ae717 100644 --- a/src/user/lib/compat.c +++ b/src/user/lib/compat.c @@ -5,7 +5,7 @@ #define eprintf(fmt, ...) fprintf(stderr, "user/lib/compat: "fmt"\n" __VA_OPT__(,) __VA_ARGS__) static handle_t h = -1; -long c0_fs_wait(char *buf, long len, struct fs_wait_response *res) { +long c0_fs_wait(char *buf, long len, struct ufs_request *res) { if (h != -1) { eprintf("didn't respond to request!"); c0_fs_respond(NULL, -1, 0); diff --git a/src/user/lib/compat.h b/src/user/lib/compat.h index b678cf5..a7c6f1f 100644 --- a/src/user/lib/compat.h +++ b/src/user/lib/compat.h @@ -2,5 +2,5 @@ #include <camellia/types.h> /* c0 - fs_wait returning a handle */ -long c0_fs_wait(char *buf, long len, struct fs_wait_response *res); +long c0_fs_wait(char *buf, long len, struct ufs_request *res); long c0_fs_respond(void *buf, long ret, int flags); diff --git a/src/user/lib/fs/misc.c b/src/user/lib/fs/misc.c index 059e1eb..3a04649 100644 --- a/src/user/lib/fs/misc.c +++ b/src/user/lib/fs/misc.c @@ -58,7 +58,7 @@ void fs_passthru(const char *prefix) { if (!buf) exit(1); for (;;) { - struct fs_wait_response res; + struct ufs_request res; handle_t reqh = _syscall_fs_wait(buf, buflen, &res); if (reqh < 0) break; switch (res.op) { @@ -89,7 +89,7 @@ void fs_whitelist(const char **list) { char *buf = malloc(buflen); if (!buf) exit(1); for (;;) { - struct fs_wait_response res; + struct ufs_request res; handle_t reqh = _syscall_fs_wait(buf, buflen, &res); if (reqh < 0) break; @@ -163,7 +163,7 @@ void fs_whitelist(const char **list) { } void fs_union(const char **list) { - struct fs_wait_response res; + struct ufs_request res; /* the buffer is split into two halves: * the second one is filled out with the path by fs_wait @@ -241,7 +241,7 @@ void fs_dir_inject(const char *path) { if (!buf) exit(1); for (;;) { - struct fs_wait_response res; + struct ufs_request res; handle_t reqh = _syscall_fs_wait(buf, buflen, &res); if (reqh < 0) break; struct fs_dir_handle *data = res.id; diff --git a/src/user/lib/syscall.c b/src/user/lib/syscall.c index 50467b3..50c71a8 100644 --- a/src/user/lib/syscall.c +++ b/src/user/lib/syscall.c @@ -50,7 +50,7 @@ long _syscall_close(handle_t h) { return _syscall(_SYSCALL_CLOSE, (long)h, 0, 0, 0, 0); } -handle_t _syscall_fs_wait(char __user *buf, long max_len, struct fs_wait_response __user *res) { +handle_t _syscall_fs_wait(char __user *buf, long max_len, struct ufs_request __user *res) { return (handle_t)_syscall(_SYSCALL_FS_WAIT, (long)buf, max_len, (long)res, 0, 0); } |