From: John Hodge Date: Fri, 25 Sep 2009 06:42:07 +0000 (+0800) Subject: Added extra debug to VFS_ReadDir X-Git-Tag: rel0.06~512 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=a661f6c8378ec3cccce468ade98edb83673e8849;p=tpg%2Facess2.git Added extra debug to VFS_ReadDir --- 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);