X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fvfs%2Fdir.c;h=911eff6f7d8bf3f0d958b6ed048a1c984d580d44;hb=6274aaa8894e14462a36c69090e2f9235f130e31;hp=cd45121307728c0565248cf5b2b3b9ab4e9654d0;hpb=04a050f42807686dc119838c82372409246d55bb;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/vfs/dir.c b/KernelLand/Kernel/vfs/dir.c index cd451213..911eff6f 100644 --- a/KernelLand/Kernel/vfs/dir.c +++ b/KernelLand/Kernel/vfs/dir.c @@ -74,7 +74,7 @@ int VFS_MkNod(const char *Path, Uint Flags) } // Permissions Check - if( !VFS_CheckACL(parent, VFS_PERM_EXECUTE|VFS_PERM_WRITE) ) { + if( !VFS_CheckACL(parent, VFS_PERM_EXEC|VFS_PERM_WRITE) ) { errno = EACCES; goto _error; } @@ -104,9 +104,11 @@ int VFS_MkNod(const char *Path, Uint Flags) return ret==NULL; _error: - _CloseNode(parent); - ASSERT(mountpt->OpenHandleCount>0); - mountpt->OpenHandleCount --; + if( parent ) { + _CloseNode(parent); + ASSERT(mountpt->OpenHandleCount>0); + mountpt->OpenHandleCount --; + } free(absPath); LEAVE('i', -1); return -1; @@ -178,10 +180,12 @@ int VFS_ReadDir(int FD, char *Dest) return 0; } + #if 0 if(h->Node->Size != (Uint64)-1 && h->Position >= h->Node->Size) { //LEAVE('i', 0); return 0; } + #endif do { rv = h->Node->Type->ReadDir(h->Node, h->Position, Dest);