diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-20 15:00:51 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-20 15:00:51 +0100 |
commit | 2d4d64189501c253ed6a5b5ff5e27da1cb34407a (patch) | |
tree | 488ed008de322f0ffbfd1efdaec2041811b41a1c /src/kernel/core | |
parent | 13db03fcc4a476c8881ccafe0852e72410c67b3a (diff) | |
download | kogata-2d4d64189501c253ed6a5b5ff5e27da1cb34407a.tar.gz kogata-2d4d64189501c253ed6a5b5ff5e27da1cb34407a.zip |
Think a bit ; ioctls only on open file descriptors.
Diffstat (limited to 'src/kernel/core')
-rw-r--r-- | src/kernel/core/kmain.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/kernel/core/kmain.c b/src/kernel/core/kmain.c index 12c813e..219bab1 100644 --- a/src/kernel/core/kmain.c +++ b/src/kernel/core/kmain.c @@ -165,14 +165,6 @@ void kernel_init_stage2(void* data) { dbg_printf("Adding module to VFS: '%s' (size %d)\n", name, len); - /* - // This would be the "good" way of doing it : - fs_handle_t* mod_f = fs_open(devfs, name, FM_WRITE | FM_CREATE); - ASSERT(mod_f != 0); - ASSERT(file_write(mod_f, 0, len, (char*)mods[i].mod_start) == len); - unref_file(mod_f); - */ - // But since we have a nullfs, we can do it that way to prevent useless data copies : ASSERT(nullfs_add_ram_file(devfs, name, (char*)mods[i].mod_start, len, false, FM_READ | FM_MMAP)); @@ -180,6 +172,7 @@ void kernel_init_stage2(void* data) { TEST_PLACEHOLDER_AFTER_DEVFS; + // Launch INIT fs_handle_t *init_bin = fs_open(devfs, "/mod/init.bin", FM_READ | FM_MMAP); if (init_bin == 0) PANIC("No init.bin module provided!"); if (!is_elf(init_bin)) PANIC("init.bin is not valid ELF32 binary"); @@ -197,13 +190,7 @@ void kernel_init_stage2(void* data) { start_process(init_p, e); - //TODO : - // - (OK) populate devfs with information regarding kernel command line & modules - // - create user process with init module provided on command line - // - give it rights to devfs - // - launch it - // - just return, this thread is done - + // We are done here dbg_printf("Reached kmain end! I'll just stop here and do nothing.\n"); } |