summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/init/syscalls.c4
-rw-r--r--src/kernel/syscalls.c4
-rw-r--r--src/shared/syscalls.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/init/syscalls.c b/src/init/syscalls.c
index b535cae..99f68f3 100644
--- a/src/init/syscalls.c
+++ b/src/init/syscalls.c
@@ -22,11 +22,11 @@ int _syscall_mount(handle_t handle, const char __user *path, int len) {
return _syscall(_SYSCALL_MOUNT, handle, (int)path, len, 0);
}
-int _syscall_read(handle_t handle, char __user *buf, int len, int offset) {
+int _syscall_read(handle_t handle, void __user *buf, int len, int offset) {
return _syscall(_SYSCALL_READ, handle, (int)buf, len, offset);
}
-int _syscall_write(handle_t handle, const char __user *buf, int len, int offset) {
+int _syscall_write(handle_t handle, const void __user *buf, int len, int offset) {
return _syscall(_SYSCALL_WRITE, handle, (int)buf, len, offset);
}
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c
index 9948506..f41aabf 100644
--- a/src/kernel/syscalls.c
+++ b/src/kernel/syscalls.c
@@ -125,7 +125,7 @@ fail:
return -1;
}
-int _syscall_read(handle_t handle_num, char __user *buf, int len, int offset) {
+int _syscall_read(handle_t handle_num, void __user *buf, int len, int offset) {
struct handle *handle = &process_current->handles[handle_num];
if (handle_num < 0 || handle_num >= HANDLE_MAX) return -1;
if (handle->type != HANDLE_FILE) return -1;
@@ -142,7 +142,7 @@ int _syscall_read(handle_t handle_num, char __user *buf, int len, int offset) {
});
}
-int _syscall_write(handle_t handle_num, const char __user *buf, int len, int offset) {
+int _syscall_write(handle_t handle_num, const void __user *buf, int len, int offset) {
struct handle *handle = &process_current->handles[handle_num];
if (handle_num < 0 || handle_num >= HANDLE_MAX) return -1;
if (handle->type != HANDLE_FILE) return -1;
diff --git a/src/shared/syscalls.h b/src/shared/syscalls.h
index b78246c..3e21b6c 100644
--- a/src/shared/syscalls.h
+++ b/src/shared/syscalls.h
@@ -43,8 +43,8 @@ int _syscall_fork(void);
handle_t _syscall_open(const char __user *path, int len);
int _syscall_mount(handle_t, const char __user *path, int len);
-int _syscall_read(handle_t, char __user *buf, int len, int offset);
-int _syscall_write(handle_t, const char __user *buf, int len, int offset);
+int _syscall_read(handle_t, void __user *buf, int len, int offset);
+int _syscall_write(handle_t, const void __user *buf, int len, int offset);
int _syscall_close(handle_t);
handle_t _syscall_fs_fork2(void);