summaryrefslogtreecommitdiff
path: root/src/user/lib/fs
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/lib/fs')
-rw-r--r--src/user/lib/fs/dir.c2
-rw-r--r--src/user/lib/fs/dir.h17
-rw-r--r--src/user/lib/fs/misc.c7
-rw-r--r--src/user/lib/fs/misc.h23
-rw-r--r--src/user/lib/fs/whitelist.c4
5 files changed, 6 insertions, 47 deletions
diff --git a/src/user/lib/fs/dir.c b/src/user/lib/fs/dir.c
index 4235ea6..71b2209 100644
--- a/src/user/lib/fs/dir.c
+++ b/src/user/lib/fs/dir.c
@@ -2,7 +2,7 @@
#include <errno.h>
#include <limits.h>
#include <string.h>
-#include <user/lib/fs/dir.h>
+#include <camellia/fs/dir.h>
void dir_start(struct dirbuild *db, long offset, char *buf, size_t buflen) {
db->offset = offset;
diff --git a/src/user/lib/fs/dir.h b/src/user/lib/fs/dir.h
deleted file mode 100644
index c3bbfe7..0000000
--- a/src/user/lib/fs/dir.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma once
-#include <camellia/types.h>
-#include <stdbool.h>
-#include <stddef.h>
-
-struct dirbuild {
- long offset;
- char *buf;
- long bpos, blen;
- long error;
-};
-
-void dir_start(struct dirbuild *db, long offset, char *buf, size_t buflen);
-bool dir_append(struct dirbuild *db, const char *name);
-bool dir_appendl(struct dirbuild *db, const char *name, size_t len);
-bool dir_append_from(struct dirbuild *db, handle_t h);
-long dir_finish(struct dirbuild *db);
diff --git a/src/user/lib/fs/misc.c b/src/user/lib/fs/misc.c
index 860b312..11428b8 100644
--- a/src/user/lib/fs/misc.c
+++ b/src/user/lib/fs/misc.c
@@ -1,15 +1,14 @@
#include <camellia/flags.h>
#include <camellia/syscalls.h>
#include <errno.h>
-#include <shared/mem.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <user/lib/compat.h>
-#include <user/lib/fs/dir.h>
-#include <user/lib/fs/misc.h>
+#include <camellia/compat.h>
+#include <camellia/fs/dir.h>
+#include <camellia/fs/misc.h>
bool fork2_n_mount(const char *path) {
handle_t h;
diff --git a/src/user/lib/fs/misc.h b/src/user/lib/fs/misc.h
deleted file mode 100644
index 35184e1..0000000
--- a/src/user/lib/fs/misc.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#pragma once
-#include <stdbool.h>
-#include <stdlib.h>
-
-bool fork2_n_mount(const char *path);
-
-void forward_open(handle_t reqh, const char *path, long len, int flags);
-
-void fs_passthru(const char *prefix);
-void fs_whitelist(const char **list);
-void fs_union(const char **list);
-
-void fs_dir_inject(const char *path);
-
-bool mount_at_pred(const char *path);
-
-// TODO separate fs drivers and wrappers around syscalls
-
-/** like _syscall_fs_wait, but ensures *buf is a null terminated string on VFSOP_OPEN */
-handle_t ufs_wait(char *buf, size_t len, struct ufs_request *req);
-
-/** Mounts something and injects its path into the fs */
-#define MOUNT_AT(path) for (; mount_at_pred(path); exit(1))
diff --git a/src/user/lib/fs/whitelist.c b/src/user/lib/fs/whitelist.c
index 571ebfb..5612d9a 100644
--- a/src/user/lib/fs/whitelist.c
+++ b/src/user/lib/fs/whitelist.c
@@ -3,8 +3,8 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#include <user/lib/fs/dir.h>
-#include <user/lib/fs/misc.h>
+#include <camellia/fs/dir.h>
+#include <camellia/fs/misc.h>
static int dir_seglen2(const char *path, size_t len) {
/* returns the length of the first segment of the path, including the trailing / (if any). */