summaryrefslogtreecommitdiff
path: root/src/user/lib
diff options
context:
space:
mode:
authordzwdz2022-09-20 23:35:33 +0200
committerdzwdz2022-09-20 23:35:33 +0200
commit3b8b63bf133e855d942abb67de931ce08b7a4452 (patch)
tree6df1767574053f61aab918d22374ef15465478ed /src/user/lib
parent917833cbe99c2083895f7ca28af218270de964d1 (diff)
shared: rename ufs_request to better fit its role in userland
The old name could have suggested that it held a response to a request received by fs_wait. The new name is unfortunately very similar to the `struct vfs_request` already used internally in the kernel, but it's better at conveying that it contains a filesystem request yet to be handled. vfs_request - virtual filesystem request (a bad name in hindsight) ufs_request - user filesystem request
Diffstat (limited to 'src/user/lib')
-rw-r--r--src/user/lib/compat.c2
-rw-r--r--src/user/lib/compat.h2
-rw-r--r--src/user/lib/fs/misc.c8
-rw-r--r--src/user/lib/syscall.c2
4 files changed, 7 insertions, 7 deletions
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);
}