aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/core')
-rw-r--r--src/kernel/core/kmain.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/kernel/core/kmain.c b/src/kernel/core/kmain.c
index e5012b3..9b1cd12 100644
--- a/src/kernel/core/kmain.c
+++ b/src/kernel/core/kmain.c
@@ -271,9 +271,20 @@ void kernel_init_stage2(void* data) {
(void*)mods[i].mod_start,
mods[i].mod_end - mods[i].mod_start,
false,
- FM_READ));
+ FM_READ | FM_MMAP));
}
+ // TEST : read /cmdline
+ dbg_printf("Trying to read /cmdline... ");
+ fs_handle_t *f = fs_open(devfs_fs, "/cmdline", FM_READ);
+ ASSERT(f != 0);
+ char buf[256];
+ size_t l = file_read(f, 0, 255, buf);
+ ASSERT(l > 0);
+ buf[l] = 0;
+ unref_file(f);
+ dbg_printf("got '%s'.\n", buf);
+
//TODO :
// - (OK) populate devfs with information regarding kernel command line & modules
// - create user process with init module provided on command line