diff --git a/sys/kernel/descrip.c b/sys/kernel/descrip.c index 575f747..241ac3c 100644 --- a/sys/kernel/descrip.c +++ b/sys/kernel/descrip.c @@ -41,13 +41,12 @@ struct file *fp = 0x0; if (uap->fd < 3) - kprintf("FD: %i", uap->fd); - - if (td->o_files[uap->fd] == 0x0) { + kprintf("FD: %i, CMD: %i", uap->fd, uap->cmd); + else if (td->o_files[uap->fd] == 0x0) { kprintf("ERROR!!!\n"); return (-1); } - + else { fp = (struct file*) td->o_files[uap->fd]; switch (uap->cmd) { case 3: @@ -60,6 +59,7 @@ default: kprintf("ERROR DEFAULT: [%i]", uap->fd); } + } return (0x0); }