summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/init/main.c8
-rw-r--r--src/init/syscalls.c4
-rw-r--r--src/kernel/syscalls.c6
-rw-r--r--src/shared/syscalls.h4
4 files changed, 11 insertions, 11 deletions
diff --git a/src/init/main.c b/src/init/main.c
index 4f99c8b..b0e31ae 100644
--- a/src/init/main.c
+++ b/src/init/main.c
@@ -15,12 +15,12 @@ const char *multipageify(const char *str) {
return out;
}
-#define mount(path) _syscall_mount(path, sizeof(path)-1, 0)
+#define mount(fd, path) _syscall_fd_mount(fd, path, sizeof(path)-1)
int main(void) {
- mount("/");
- mount("/some/where");
- mount("/some");
+ mount(0, "/");
+ mount(0, "/some/where");
+ mount(0, "/some");
_syscall_fs_open(
multipageify("/some/where/file"),
diff --git a/src/init/syscalls.c b/src/init/syscalls.c
index 8c747e4..7963da2 100644
--- a/src/init/syscalls.c
+++ b/src/init/syscalls.c
@@ -21,8 +21,8 @@ fd_t _syscall_fs_open(const user_ptr path, int len) {
return _syscall(_SYSCALL_FS_OPEN, (int)path, len, 0);
}
-int _syscall_mount(const user_ptr path, int len, fd_t fd) {
- return _syscall(_SYSCALL_MOUNT, (int)path, len, fd);
+int _syscall_fd_mount(fd_t fd, const user_ptr path, int len) {
+ return _syscall(_SYSCALL_FD_MOUNT, fd, (int)path, len);
}
int _syscall_fd_read(fd_t fd, user_ptr buf, int len) {
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c
index 533ebca..e0fb08b 100644
--- a/src/kernel/syscalls.c
+++ b/src/kernel/syscalls.c
@@ -100,7 +100,7 @@ fd_t _syscall_fs_open(const user_ptr path, int len) {
return -1;
}
-int _syscall_mount(const user_ptr path, int len, fd_t fd) {
+int _syscall_fd_mount(fd_t fd, const user_ptr path, int len) {
struct virt_iter iter;
struct vfs_mount *mount;
char *path_buf;
@@ -156,8 +156,8 @@ int syscall_handler(int num, int a, int b, int c) {
return _syscall_fork();
case _SYSCALL_FS_OPEN:
return _syscall_fs_open(a, b);
- case _SYSCALL_MOUNT:
- return _syscall_mount(a, b, c);
+ case _SYSCALL_FD_MOUNT:
+ return _syscall_fd_mount(a, b, c);
case _SYSCALL_FD_READ:
return _syscall_fd_read(a, b, c);
case _SYSCALL_FD_WRITE:
diff --git a/src/shared/syscalls.h b/src/shared/syscalls.h
index d0c6640..a4957a9 100644
--- a/src/shared/syscalls.h
+++ b/src/shared/syscalls.h
@@ -13,7 +13,7 @@ enum {
_SYSCALL_FORK,
_SYSCALL_FS_OPEN,
- _SYSCALL_MOUNT,
+ _SYSCALL_FD_MOUNT,
_SYSCALL_FD_READ,
_SYSCALL_FD_WRITE,
@@ -37,8 +37,8 @@ int _syscall_await(user_ptr buf, int len);
int _syscall_fork(void);
fd_t _syscall_fs_open(const user_ptr path, int len);
-int _syscall_mount(const user_ptr path, int len, fd_t fd);
+int _syscall_fd_mount(fd_t fd, const user_ptr path, int len);
int _syscall_fd_read(fd_t fd, user_ptr buf, int len);
int _syscall_fd_write(fd_t fd, user_ptr buf, int len);
int _syscall_fd_close(fd_t fd);