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
Fix clean all script for renamed armv7 arch
[tpg/acess2.git]
/
Kernel
/
vfs
/
open.c
diff --git
a/Kernel/vfs/open.c
b/Kernel/vfs/open.c
index
f549d2b
..
1845b7a
100644
(file)
--- a/
Kernel/vfs/open.c
+++ b/
Kernel/vfs/open.c
@@
-199,6
+199,7
@@
restart_parse:
*TruePath = malloc( gVFS_RootMount->MountPointLen+1 );
strcpy(*TruePath, gVFS_RootMount->MountPoint);
}
*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;
}
LEAVE('p', gVFS_RootMount->RootNode);
return gVFS_RootMount->RootNode;
}
@@
-452,6
+453,9
@@
restart_parse:
int VFS_int_CreateHandle( tVFS_Node *Node, tVFS_Mount *Mount, int Mode )
{
int i;
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;
i = 0;
i |= (Mode & VFS_OPENFLAG_EXEC) ? VFS_PERM_EXECUTE : 0;
i |= (Mode & VFS_OPENFLAG_READ) ? VFS_PERM_READ : 0;
@@
-533,7
+537,7
@@
int VFS_Open(const char *Path, Uint Mode)
LEAVE_RET('i', -1);
}
}
LEAVE_RET('i', -1);
}
}
-
+
LEAVE_RET('x', VFS_int_CreateHandle(node, mnt, Mode));
}
LEAVE_RET('x', VFS_int_CreateHandle(node, mnt, Mode));
}
@@
-578,7
+582,7
@@
int VFS_OpenInode(Uint32 Mount, Uint64 Inode, int Mode)
tVFS_Mount *mnt;
tVFS_Node *node;
tVFS_Mount *mnt;
tVFS_Node *node;
- ENTER("iMount
i
Inode xMode", Mount, Inode, Mode);
+ ENTER("iMount
X
Inode xMode", Mount, Inode, Mode);
// Get mount point
mnt = VFS_GetMountByIdent(Mount);
// Get mount point
mnt = VFS_GetMountByIdent(Mount);
@@
-590,6
+594,7
@@
int VFS_OpenInode(Uint32 Mount, Uint64 Inode, int Mode)
// Does the filesystem support this?
if( !mnt->Filesystem->GetNodeFromINode ) {
// Does the filesystem support this?
if( !mnt->Filesystem->GetNodeFromINode ) {
+ LOG("Filesystem does not support inode accesses");
errno = ENOENT;
LEAVE_RET('i', -1);
}
errno = ENOENT;
LEAVE_RET('i', -1);
}
@@
-597,6
+602,7
@@
int VFS_OpenInode(Uint32 Mount, Uint64 Inode, int Mode)
// Get node
node = mnt->Filesystem->GetNodeFromINode(mnt->RootNode, Inode);
if( !node ) {
// Get node
node = mnt->Filesystem->GetNodeFromINode(mnt->RootNode, Inode);
if( !node ) {
+ LOG("Unable to find inode");
errno = ENOENT;
LEAVE_RET('i', -1);
}
errno = ENOENT;
LEAVE_RET('i', -1);
}
@@
-645,14
+651,14
@@
int VFS_ChDir(const char *Dest)
// Create Absolute
buf = VFS_GetAbsPath(Dest);
if(buf == NULL) {
// 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) {
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;
}
return -1;
}
UCC
git Repository :: git.ucc.asn.au