From a661f6c8378ec3cccce468ade98edb83673e8849 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Fri, 25 Sep 2009 14:42:07 +0800 Subject: [PATCH] Added extra debug to VFS_ReadDir --- Kernel/vfs/dir.c | 2 ++ Usermode/Applications/CLIShell_src/main.c | 6 +++--- Usermode/include/acess/sys.h | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Kernel/vfs/dir.c b/Kernel/vfs/dir.c index 57c11c14..cb2bd8db 100644 --- a/Kernel/vfs/dir.c +++ b/Kernel/vfs/dir.c @@ -141,6 +141,8 @@ int VFS_ReadDir(int FD, char *Dest) tVFS_Handle *h = VFS_GetHandle(FD); char *tmp; + ENTER("ph pDest", h, Dest); + if(h) return -1; if(h->Node->ReadDir == NULL) return 0; diff --git a/Usermode/Applications/CLIShell_src/main.c b/Usermode/Applications/CLIShell_src/main.c index cb76be11..494b25e5 100644 --- a/Usermode/Applications/CLIShell_src/main.c +++ b/Usermode/Applications/CLIShell_src/main.c @@ -353,9 +353,9 @@ void Command_Dir(int argc, char **argv) if(dp == -1) { //printf("Unable to open directory `%s', File cannot be found\n", tmpPath); - //write(_stdout, 27, "Unable to open directory `"); - //write(_stdout, strlen(tmpPath)+1, tmpPath); - //write(_stdout, 25, "', File cannot be found\n"); + write(_stdout, 27, "Unable to open directory `"); + write(_stdout, strlen(tmpPath)+1, tmpPath); + write(_stdout, 25, "', File cannot be found\n"); return; } // Get File Stats diff --git a/Usermode/include/acess/sys.h b/Usermode/include/acess/sys.h index 1b39c5c1..05f717b1 100644 --- a/Usermode/include/acess/sys.h +++ b/Usermode/include/acess/sys.h @@ -52,6 +52,7 @@ uint64_t write(int fd, uint64_t length, void *buffer); int seek(int fd, uint64_t offset, int whence); int ioctl(int fd, int id, void *data); int finfo(int fd, t_sysFInfo *info, int maxacls); + int readdir(int fd, char *dest); // --- MEMORY --- uint64_t _SysGetPhys(uint vaddr); -- 2.20.1