diff --git a/sys/fs/fat/fat_filelib.c b/sys/fs/fat/fat_filelib.c index 5c37840..288c028 100644 --- a/sys/fs/fat/fat_filelib.c +++ b/sys/fs/fat/fat_filelib.c @@ -862,6 +862,8 @@ if (file) { FL_LOCK(&_fs); + kprintf("fl_fclose: %s", file->filename); + // Flush un-written data to file fl_fflush(f); diff --git a/sys/fs/vfs/file.c b/sys/fs/vfs/file.c index 3e249ad..bf58c39 100644 --- a/sys/fs/vfs/file.c +++ b/sys/fs/vfs/file.c @@ -314,9 +314,9 @@ size_t fwrite(void *ptr, int size, int nmemb, fileDescriptor_t *fd) { int res = 0x0; /* - kprintf("fd[0x%X]\m", fd); - kprintf("fd->mp[0x%X]\m", fd->mp); - kprintf("fd->mp->fs[0x%X]\m", fd->mp->fs); + kprintf("fd[0x%X]\m", fd); + kprintf("fd->mp[0x%X]\m", fd->mp); + kprintf("fd->mp->fs[0x%X]\m", fd->mp->fs); */ if (fd != 0x0) { @@ -547,7 +547,6 @@ if (fd->dup > 0) fd->dup--; else { - fd->dup = -2; if (fd->res != 0x0) fl_fclose(fd->res); diff --git a/sys/kernel/descrip.c b/sys/kernel/descrip.c index c7b41e6..de8cb6b 100644 --- a/sys/kernel/descrip.c +++ b/sys/kernel/descrip.c @@ -155,7 +155,6 @@ td->o_files[fd] = 0x0; } - kprintf("ERR: %i", error); return (error); }