From: John Hodge (sonata) Date: Wed, 5 Nov 2014 07:08:54 +0000 (+0800) Subject: Kernel/VFS - Better error reporting in open X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=9c4eedf4893f851bd1ba60ce541c8d098a9ef7f7;p=tpg%2Facess2.git Kernel/VFS - Better error reporting in open --- diff --git a/KernelLand/Kernel/vfs/open.c b/KernelLand/Kernel/vfs/open.c index 77e58f5c..e5a206fb 100644 --- a/KernelLand/Kernel/vfs/open.c +++ b/KernelLand/Kernel/vfs/open.c @@ -356,7 +356,7 @@ restart_parse: } if(iNestedLinks > MAX_NESTED_LINKS) { - Log_Notice("VFS", "VFS_ParsePath - Nested link limit exceeded"); + Log_Notice("VFS", "VFS_ParsePath - Nested link limit exceeded on '%.*s'", ofs, Path); errno = ENOENT; goto _error; } @@ -391,7 +391,8 @@ restart_parse: // Handle Non-Directories if( !(curNode->Flags & VFS_FFLAG_DIRECTORY) ) { - Log_Warning("VFS", "VFS_ParsePath - Path segment is not a directory"); + Log_Warning("VFS", "VFS_ParsePath - Path segment '%.*s' is not a directory (curNode{%p}->Flags = 0x%x)", + ofs+nextSlash, Path, curNode, curNode->Flags); errno = ENOTDIR; goto _error; } @@ -420,7 +421,7 @@ restart_parse: // Check final finddir call if( !curNode->Type || !curNode->Type->FindDir ) { - Log_Warning("VFS", "VFS_ParsePath - FindDir doesn't exist for element of '%s'", Path); + Log_Warning("VFS", "VFS_ParsePath - FindDir doesn't exist for leaf of '%s' (dir '%.*s')", Path, ofs, Path); errno = ENOENT; goto _error; }