diff options
Diffstat (limited to 'src/kernel/fd.c')
-rw-r--r-- | src/kernel/fd.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/kernel/fd.c b/src/kernel/fd.c new file mode 100644 index 0000000..54f1c72 --- /dev/null +++ b/src/kernel/fd.c @@ -0,0 +1,13 @@ +#include <kernel/fd.h> +#include <kernel/panic.h> +#include <kernel/proc.h> + +int fdop_dispatch(enum fdop fdop, fd_t fd, void *ptr, size_t len) { + if (fd < 0 || fd >= FD_MAX) return -1; + switch(process_current->fds[fd].type) { + case FD_EMPTY: + return -1; + default: + panic(); + } +} |