summaryrefslogtreecommitdiff
path: root/src/kernel/core/kmain.cpp
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-18 13:42:09 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-18 13:42:09 +0200
commit1ecb3fb821f49450ba4b08ad7d7a23d3acb75c47 (patch)
treecd7f14d2659809286e59c929e91fe5c02c138002 /src/kernel/core/kmain.cpp
parentf56aa2f7e4b8e6430e123f714507032a33955a09 (diff)
downloadTCE-1ecb3fb821f49450ba4b08ad7d7a23d3acb75c47.tar.gz
TCE-1ecb3fb821f49450ba4b08ad7d7a23d3acb75c47.zip
Improvements. Next: initrd.
Diffstat (limited to 'src/kernel/core/kmain.cpp')
-rw-r--r--src/kernel/core/kmain.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/core/kmain.cpp b/src/kernel/core/kmain.cpp
index 314c033..9ec06df 100644
--- a/src/kernel/core/kmain.cpp
+++ b/src/kernel/core/kmain.cpp
@@ -77,15 +77,15 @@ extern "C" void kmain(multiboot_info_t* mbd, int32_t magic) {
*ke_vt << "Loading modules :\n";
for (unsigned i = 0; i < mbd->mods_count; i++) {
*ke_vt << " * " << (char*)mods[i].string;
- if (elf_check((uint8_t*)mods[i].mod_start)) {
- *ke_vt << " : Invalid ELF file\n";
- } else {
+ if (elf_check((uint8_t*)mods[i].mod_start) == 0) {
process *pr = elf_exec((uint8_t*)mods[i].mod_start, PL_USER);
if (pr == 0) {
*ke_vt << " : Error loading\n";
} else {
*ke_vt << " : OK, pid=" << (int)pr->pid << "\n";
}
+ } else {
+ *ke_vt << " : Invalid ELF file\n";
}
}