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
More work on x86_64 port of usermode
[tpg/acess2.git]
/
Kernel
/
vfs
/
open.c
diff --git
a/Kernel/vfs/open.c
b/Kernel/vfs/open.c
index
b0de784
..
0820102
100644
(file)
--- a/
Kernel/vfs/open.c
+++ b/
Kernel/vfs/open.c
@@
-15,8
+15,6
@@
// === IMPORTS ===
extern tVFS_Node gVFS_MemRoot;
extern tVFS_Mount *gVFS_RootMount;
// === IMPORTS ===
extern tVFS_Node gVFS_MemRoot;
extern tVFS_Mount *gVFS_RootMount;
-
-extern tVFS_Handle *VFS_GetHandle(int FD);
extern int VFS_AllocHandle(int bIsUser, tVFS_Node *Node, int Mode);
// === CODE ===
extern int VFS_AllocHandle(int bIsUser, tVFS_Node *Node, int Mode);
// === CODE ===
@@
-32,9
+30,9
@@
char *VFS_GetAbsPath(const char *Path)
char *tmpStr;
int iPos = 0;
int iPos2 = 0;
char *tmpStr;
int iPos = 0;
int iPos2 = 0;
- c
har
*chroot = CFGPTR(CFG_VFS_CHROOT);
+ c
onst char
*chroot = CFGPTR(CFG_VFS_CHROOT);
int chrootLen;
int chrootLen;
- c
har
*cwd = CFGPTR(CFG_VFS_CWD);
+ c
onst char
*cwd = CFGPTR(CFG_VFS_CWD);
int cwdLen;
ENTER("sPath", Path);
int cwdLen;
ENTER("sPath", Path);
@@
-43,7
+41,7
@@
char *VFS_GetAbsPath(const char *Path)
if(Path[0] == '$') {
ret = malloc(strlen(Path)+1);
if(!ret) {
if(Path[0] == '$') {
ret = malloc(strlen(Path)+1);
if(!ret) {
-
Warning("VFS_GetAbsPath -
malloc() returned NULL");
+
Log_Warning("VFS", "VFS_GetAbsPath:
malloc() returned NULL");
return NULL;
}
strcpy(ret, Path);
return NULL;
}
strcpy(ret, Path);
@@
-63,7
+61,7
@@
char *VFS_GetAbsPath(const char *Path)
if(Path[0] == '/') {
ret = malloc(pathLen + 1);
if(!ret) {
if(Path[0] == '/') {
ret = malloc(pathLen + 1);
if(!ret) {
-
Warning("VFS_GetAbsPath -
malloc() returned NULL");
+
Log_Warning("VFS", "VFS_GetAbsPath:
malloc() returned NULL");
return NULL;
}
strcpy(ret, Path);
return NULL;
}
strcpy(ret, Path);
@@
-442,10
+440,10
@@
tVFS_Node *VFS_ParsePath(const char *Path, char **TruePath)
}
/**
}
/**
- * \fn int VFS_Open(char *Path, Uint Mode)
+ * \fn int VFS_Open(c
onst c
har *Path, Uint Mode)
* \brief Open a file
*/
* \brief Open a file
*/
-int VFS_Open(char *Path, Uint Mode)
+int VFS_Open(c
onst c
har *Path, Uint Mode)
{
tVFS_Node *node;
char *absPath;
{
tVFS_Node *node;
char *absPath;
@@
-510,7
+508,7
@@
int VFS_Open(char *Path, Uint Mode)
}
i = VFS_AllocHandle( !!(Mode & VFS_OPENFLAG_USER), node, Mode );
}
i = VFS_AllocHandle( !!(Mode & VFS_OPENFLAG_USER), node, Mode );
- if( i > 0 ) {
+ if( i >
=
0 ) {
LEAVE('x', i);
return i;
}
LEAVE('x', i);
return i;
}
@@
-524,7
+522,7
@@
int VFS_Open(char *Path, Uint Mode)
/**
* \brief Open a file from an open directory
*/
/**
* \brief Open a file from an open directory
*/
-int VFS_OpenChild(Uint *Errno, int FD, char *Name, Uint Mode)
+int VFS_OpenChild(Uint *Errno, int FD, c
onst c
har *Name, Uint Mode)
{
tVFS_Handle *h;
tVFS_Node *node;
{
tVFS_Handle *h;
tVFS_Node *node;
@@
-570,7
+568,7
@@
int VFS_OpenChild(Uint *Errno, int FD, char *Name, Uint Mode)
}
i = VFS_AllocHandle( !!(Mode & VFS_OPENFLAG_USER), node, Mode );
}
i = VFS_AllocHandle( !!(Mode & VFS_OPENFLAG_USER), node, Mode );
- if( i > 0 ) {
+ if( i >
=
0 ) {
LEAVE('x', i);
return i;
}
LEAVE('x', i);
return i;
}
UCC
git Repository :: git.ucc.asn.au