summaryrefslogtreecommitdiff
path: root/src/kernel/fd.c
blob: 54f1c7281dc4b33ed795f551df6c54a0805a15a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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();
	}
}