diff options
author | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-18 13:42:09 +0200 |
---|---|---|
committer | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-18 13:42:09 +0200 |
commit | 1ecb3fb821f49450ba4b08ad7d7a23d3acb75c47 (patch) | |
tree | cd7f14d2659809286e59c929e91fe5c02c138002 /src/kernel/core | |
parent | f56aa2f7e4b8e6430e123f714507032a33955a09 (diff) | |
download | TCE-1ecb3fb821f49450ba4b08ad7d7a23d3acb75c47.tar.gz TCE-1ecb3fb821f49450ba4b08ad7d7a23d3acb75c47.zip |
Improvements. Next: initrd.
Diffstat (limited to 'src/kernel/core')
-rw-r--r-- | src/kernel/core/kmain.cpp | 6 |
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"; } } |