summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordzwdz2021-08-24 16:49:23 +0200
committerdzwdz2021-08-24 16:49:23 +0200
commit8625003ed7f688a62988f03cc6987574b9d591d2 (patch)
tree999769ef7e8d8a2eefc3b5cdced4fc2c32f4f46b /src
parent9958bdacfa51b5d8eee386b863cdcc2d76f44f4a (diff)
remove _syscall_debug_log, as it's not needed anymore
Diffstat (limited to 'src')
-rw-r--r--src/init/syscalls.c4
-rw-r--r--src/kernel/syscalls.c10
-rw-r--r--src/kernel/syscalls.h7
3 files changed, 0 insertions, 21 deletions
diff --git a/src/init/syscalls.c b/src/init/syscalls.c
index 4f207db..9422e79 100644
--- a/src/init/syscalls.c
+++ b/src/init/syscalls.c
@@ -35,7 +35,3 @@ int _syscall_fd_write(fd_t fd, char *buf, int len) {
int _syscall_fd_close(fd_t fd) {
return _syscall(_SYSCALL_FD_CLOSE, fd, 0, 0);
}
-
-int _syscall_debuglog(const char *msg, size_t len) {
- return _syscall(_SYSCALL_DEBUGLOG, (int)msg, len, 0);
-}
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c
index 015bb17..9e64b01 100644
--- a/src/kernel/syscalls.c
+++ b/src/kernel/syscalls.c
@@ -145,14 +145,6 @@ int _syscall_fd_close(fd_t fd) {
return fdop_dispatch(FDOP_CLOSE, &process_current->fds[fd], 0, 0);
}
-int _syscall_debuglog(const char *msg, size_t len) {
- struct virt_iter iter;
- virt_iter_new(&iter, (void*)msg, len, process_current->pages, true, false);
- while (virt_iter_next(&iter))
- tty_write(iter.frag, iter.frag_len);
- return iter.prior;
-}
-
int syscall_handler(int num, int a, int b, int c) {
switch (num) {
case _SYSCALL_EXIT:
@@ -171,8 +163,6 @@ int syscall_handler(int num, int a, int b, int c) {
return _syscall_fd_write(a, (void*)b, c);
case _SYSCALL_FD_CLOSE:
return _syscall_fd_close(a);
- case _SYSCALL_DEBUGLOG:
- return _syscall_debuglog((void*)a, b);
default:
tty_const("unknown syscall ");
panic();
diff --git a/src/kernel/syscalls.h b/src/kernel/syscalls.h
index d8ca5c3..c390c73 100644
--- a/src/kernel/syscalls.h
+++ b/src/kernel/syscalls.h
@@ -17,8 +17,6 @@ enum {
_SYSCALL_FD_READ,
_SYSCALL_FD_WRITE,
_SYSCALL_FD_CLOSE,
-
- _SYSCALL_DEBUGLOG
};
/** Kills the current process.
@@ -43,8 +41,3 @@ int _syscall_mount(const char *path, int len, fd_t fd);
int _syscall_fd_read(fd_t fd, char *buf, int len);
int _syscall_fd_write(fd_t fd, char *buf, int len);
int _syscall_fd_close(fd_t fd);
-
-/** Prints a message to the debug console.
- * @return the amount of bytes written (can be less than len)
- */
-int _syscall_debuglog(const char *msg, size_t len);