X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fvfs%2Fopen.c;h=983a2b238bb38b79476c34a1ef9fa2cb12434752;hb=8dcc3e209d0d728565a18c8dca2b0ba220b74a6f;hp=12a8f8d19952ecdbcaedaf63d4bf0a6f456c08f0;hpb=82348a3d91e9a846d6997c16ddca3add6a5bf21b;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/vfs/open.c b/KernelLand/Kernel/vfs/open.c index 12a8f8d1..983a2b23 100644 --- a/KernelLand/Kernel/vfs/open.c +++ b/KernelLand/Kernel/vfs/open.c @@ -283,9 +283,16 @@ restart_parse: } // Check if the node has a FindDir method + if( !curNode->Type ) + { + LOG("Finddir failure on '%s' - No type", Path); + Log_Error("VFS", "Node at '%s' has no type (mount %s:%s)", + Path, mnt->Filesystem->Name, mnt->MountPoint); + goto _error; + } if( !curNode->Type->FindDir ) { - LOG("Finddir failure on '%s'", Path); + LOG("Finddir failure on '%s' - No FindDir method in %s", Path, curNode->Type->Name); goto _error; } LOG("FindDir{=%p}(%p, '%s')", curNode->Type->FindDir, curNode, pathEle); @@ -647,7 +654,8 @@ void VFS_Close(int FD) _CloseNode(h->Node); - h->Mount->OpenHandleCount --; + if( h->Mount ) + h->Mount->OpenHandleCount --; h->Node = NULL; } @@ -694,7 +702,7 @@ int VFS_ChDir(const char *Dest) *cwdptr = buf; } - Log("Updated CWD to '%s'", buf); + Log_Debug("VFS", "Updated CWD to '%s'", buf); return 1; }