diff --git a/kernel/src/sys/stdio.cpp b/kernel/src/sys/stdio.cpp index 255a92d8..a4136a6d 100644 --- a/kernel/src/sys/stdio.cpp +++ b/kernel/src/sys/stdio.cpp @@ -37,6 +37,7 @@ void sys_open(Context* context, const char* filename, int flags) context->rax = -ENOENT; return; } + kdbgln("open(): opening %s, allocated file descriptor %d", filename, fd); current_task->files[fd].open(node, (bool)flags); // FIXME: Implement more flags. (right now, 1 is can_read, 0 is not) context->rax = fd; @@ -84,6 +85,7 @@ void sys_close(Context* context, int fd) context->rax = -EBADF; return; } + kdbgln("close(): releasing file descriptor %d", fd); current_task->files[fd].close(); context->rax = 0; return;