diff --git a/sys/fs/fat/fat.c b/sys/fs/fat/fat.c index 7c421f9..19d67c4 100644 --- a/sys/fs/fat/fat.c +++ b/sys/fs/fat/fat.c @@ -140,7 +140,7 @@ assert(fd->mp->device->devInfo->read); assert(file); - //kprintf("File: %s, ", file); + kprintf("File: %s, ", file); kprintf("Mode: 0x%X\n", fd->mode); if ((fd->mode & 0x1) == 0x1) diff --git a/sys/kernel/descrip.c b/sys/kernel/descrip.c index 101bdc8..6833f7e 100644 --- a/sys/kernel/descrip.c +++ b/sys/kernel/descrip.c @@ -313,7 +313,7 @@ int dup2(struct thread *td, u_int32_t from, u_int32_t to) { - kprintf("DUP2: %i:%i", from, to); + if (to > MAX_FILES) { kprintf("TO: %i > MAX_FILES: %i", to, MAX_FILES); @@ -326,6 +326,7 @@ td->o_files[to] = td->o_files[from]; + kprintf("DUP2: %i:%i [0x%X:0x%X]", from, to, td->o_files[from], td->o_files[to]); return (0x0); }