5 * - Implementation of the SYS_AN_GETPATH system call
11 extern char *getcwd(char *buf, size_t size);
13 extern tVFS_NodeType gNativeFS_FileNodeType;
14 extern tVFS_NodeType gNativeFS_DirNodeType;
16 int Syscall_AN_GetPath_Real(char *Dst, size_t DstLen, const char *Path)
18 tVFS_Node *node = VFS_ParsePath(Path, NULL, NULL);
21 const char *relpath = NULL;
23 if( node->Type == &gNativeFS_FileNodeType || node->Type == &gNativeFS_DirNodeType )
35 if( relpath[0] == '/' ) {
36 ret = snprintf(Dst, DstLen, "%s", relpath);
41 ret += snprintf(Dst+ret, DstLen-ret, "/%s", relpath);