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
Modules/Tegra2Vid - Fixed out-of-date IO function prototypes
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
modules.c
diff --git
a/KernelLand/Kernel/modules.c
b/KernelLand/Kernel/modules.c
index
544e866
..
b5e917c
100644
(file)
--- a/
KernelLand/Kernel/modules.c
+++ b/
KernelLand/Kernel/modules.c
@@
-341,7
+341,7
@@
int Module_LoadMem(void *Buffer, Uint Length, const char *ArgString)
VFS_GetMemPath(path, Buffer, Length);
VFS_GetMemPath(path, Buffer, Length);
- return Module_LoadFile( path, ArgString );
+ return Module_LoadFile( path, ArgString )
== EOK
;
}
/**
}
/**
@@
-360,15
+360,15
@@
int Module_LoadFile(const char *Path, const char *ArgString)
// Error check
if(base == NULL) {
Log_Warning("Module", "Module_LoadFile - Unable to load '%s'", Path);
// Error check
if(base == NULL) {
Log_Warning("Module", "Module_LoadFile - Unable to load '%s'", Path);
- return
0
;
+ return
ENOENT
;
}
// TODO: I need a way of relocating the dependencies before everything else, so
// they can be resolved before any other link errors
if( !Binary_Relocate(base) ) {
}
// TODO: I need a way of relocating the dependencies before everything else, so
// they can be resolved before any other link errors
if( !Binary_Relocate(base) ) {
- Log_Warning("Relocation of module %s failed", Path);
+ Log_Warning("
Module", "
Relocation of module %s failed", Path);
Binary_Unload(base);
Binary_Unload(base);
- return
0
;
+ return
EINVAL
;
}
// Check for Acess Driver
}
// Check for Acess Driver
@@
-384,24
+384,34
@@
int Module_LoadFile(const char *Path, const char *ArgString)
if( !loader ) {
Binary_Unload(base);
Log_Warning("Module", "Module '%s' does not have a Module Info struct", Path);
if( !loader ) {
Binary_Unload(base);
Log_Warning("Module", "Module '%s' does not have a Module Info struct", Path);
- return
0
;
+ return
EINVAL
;
}
}
}
}
- if( !Module_int_ResolveDeps(info) ) {
- Log_Warning("Dependencies not met for '%s'", Path);
- Binary_Unload(base);
- return 0;
+ if( loader )
+ {
+ if( loader->Loader(base) )
+ {
+ Binary_Unload(base);
+ return EINVAL;
+ }
}
}
-
- // Initialise (and register)
- if( loader ? loader->Loader(base) : Module_int_Initialise( info, ArgString ) )
+ else
{
{
- Binary_Unload(base);
- return 0;
+ if( !Module_int_ResolveDeps(info) ) {
+ Log_Warning("Module", "Dependencies not met for '%s'", Path);
+ Binary_Unload(base);
+ return EINVAL;
+ }
+
+ if( Module_int_Initialise(info, ArgString) )
+ {
+ Binary_Unload(base);
+ return EINVAL;
+ }
}
}
- return
1
;
+ return
0
;
}
/**
}
/**
UCC
git Repository :: git.ucc.asn.au