diff --git a/sys/kernel/descrip.c b/sys/kernel/descrip.c index 919daf9..61429ea 100644 --- a/sys/kernel/descrip.c +++ b/sys/kernel/descrip.c @@ -37,7 +37,7 @@ static struct file *kern_files = 0x0; -int fcntl(struct thread *td, struct fcntl_args *uap) { +int fcntl(struct thread *td, struct sys_fcntl_args *uap) { struct file *fp = 0x0; struct file *dup_fp = 0x0; int i = 0; @@ -47,7 +47,6 @@ return (-1); } - fp = (struct file*) td->o_files[uap->fd]; switch (uap->cmd) { @@ -87,7 +86,6 @@ kprintf("ERROR DEFAULT: [%i]", uap->fd); } - return (0x0); } @@ -95,6 +93,7 @@ return (fcntl(td, uap)); } + int falloc(struct thread *td, struct file **resultfp, int *resultfd) { struct file *fp = 0x0; @@ -337,7 +336,7 @@ else if (td->o_files[to] != 0x0) { fclose(((struct file*) td->o_files[to])->fd); - fdestroy(td, ((struct file*) td->o_files[to])->fd, to); + fdestroy(td, (struct file*) td->o_files[to], to); } fp = (struct file*) td->o_files[from];