git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kernel/vfs - TODO in open.c for relative symlinks
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
vfs
/
open.c
diff --git
a/KernelLand/Kernel/vfs/open.c
b/KernelLand/Kernel/vfs/open.c
index
12a8f8d
..
e4d2bb2
100644
(file)
--- 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
}
// 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 )
{
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);
goto _error;
}
LOG("FindDir{=%p}(%p, '%s')", curNode->Type->FindDir, curNode, pathEle);
@@
-331,6
+338,7
@@
restart_parse:
path_buffer[ curNode->Size ] = '\0';
LOG("path_buffer = '%s'", path_buffer);
strcat(path_buffer, Path + ofs+nextSlash);
path_buffer[ curNode->Size ] = '\0';
LOG("path_buffer = '%s'", path_buffer);
strcat(path_buffer, Path + ofs+nextSlash);
+ // TODO: Pass to VFS_GetAbsPath to handle ../. in the symlink
Path = path_buffer;
// Log_Debug("VFS", "VFS_ParsePath: Symlink translated to '%s'", Path);
Path = path_buffer;
// Log_Debug("VFS", "VFS_ParsePath: Symlink translated to '%s'", Path);
@@
-647,7
+655,8
@@
void VFS_Close(int FD)
_CloseNode(h->Node);
_CloseNode(h->Node);
- h->Mount->OpenHandleCount --;
+ if( h->Mount )
+ h->Mount->OpenHandleCount --;
h->Node = NULL;
}
h->Node = NULL;
}
@@
-694,7
+703,7
@@
int VFS_ChDir(const char *Dest)
*cwdptr = buf;
}
*cwdptr = buf;
}
- Log
(
"Updated CWD to '%s'", buf);
+ Log
_Debug("VFS",
"Updated CWD to '%s'", buf);
return 1;
}
return 1;
}
UCC
git Repository :: git.ucc.asn.au