*TruePath = malloc( gVFS_RootMount->MountPointLen+1 );
strcpy(*TruePath, gVFS_RootMount->MountPoint);
}
+ if(MountPoint) *MountPoint = gVFS_RootMount;
LEAVE('p', gVFS_RootMount->RootNode);
return gVFS_RootMount->RootNode;
}
int VFS_int_CreateHandle( tVFS_Node *Node, tVFS_Mount *Mount, int Mode )
{
int i;
+
+ ENTER("pNode pMount iMode", Node, Mount, Mode);
+
i = 0;
i |= (Mode & VFS_OPENFLAG_EXEC) ? VFS_PERM_EXECUTE : 0;
i |= (Mode & VFS_OPENFLAG_READ) ? VFS_PERM_READ : 0;
LEAVE_RET('i', -1);
}
}
-
+
LEAVE_RET('x', VFS_int_CreateHandle(node, mnt, Mode));
}
tVFS_Mount *mnt;
tVFS_Node *node;
- ENTER("iMount iInode xMode", Mount, Inode, Mode);
+ ENTER("iMount XInode xMode", Mount, Inode, Mode);
// Get mount point
mnt = VFS_GetMountByIdent(Mount);
// Does the filesystem support this?
if( !mnt->Filesystem->GetNodeFromINode ) {
+ LOG("Filesystem does not support inode accesses");
errno = ENOENT;
LEAVE_RET('i', -1);
}
// Get node
node = mnt->Filesystem->GetNodeFromINode(mnt->RootNode, Inode);
if( !node ) {
+ LOG("Unable to find inode");
errno = ENOENT;
LEAVE_RET('i', -1);
}
// Create Absolute
buf = VFS_GetAbsPath(Dest);
if(buf == NULL) {
- Log("VFS_ChDir: Path expansion failed");
+ Log_Notice("VFS", "VFS_ChDir: Path expansion failed");
return -1;
}
// Check if path exists
fd = VFS_Open(buf, VFS_OPENFLAG_EXEC);
if(fd == -1) {
- Log("VFS_ChDir: Path is invalid");
+ Log_Notice("VFS", "VFS_ChDir: Path is invalid");
return -1;
}