diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-24 18:52:09 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-24 18:52:09 +0100 |
commit | 990e4785820136f2ab4a3bf4c1afbf0e8cf28b3c (patch) | |
tree | 26a6df66cdf12d9539e455c3607290ab069a3983 /src/kernel/core/kmain.c | |
parent | d89c862fb2f569275300d6a64caaa0b287367558 (diff) | |
download | kogata-990e4785820136f2ab4a3bf4c1afbf0e8cf28b3c.tar.gz kogata-990e4785820136f2ab4a3bf4c1afbf0e8cf28b3c.zip |
Complete ISO9660 impl ; some strange wtf is going on.
Diffstat (limited to 'src/kernel/core/kmain.c')
-rw-r--r-- | src/kernel/core/kmain.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/kernel/core/kmain.c b/src/kernel/core/kmain.c index 8242f99..c08d749 100644 --- a/src/kernel/core/kmain.c +++ b/src/kernel/core/kmain.c @@ -155,6 +155,22 @@ void kernel_init_stage2(void* data) { fs_t *rootfs = 0; if (btree_find(cmdline, "root") != 0) rootfs = setup_rootfs(cmdline, iofs); + if (rootfs != 0) { + fs_handle_t *readme = fs_open(rootfs, "/readme.md", FM_READ); + if (readme != 0) { + char buf[100]; + dbg_printf("Read %d.\n", file_read(readme, 0, 100, buf)); + buf[99] = 0; + dbg_printf("%s\n", buf); + unref_file(readme); + } + } + + void iter(void* a, void* b) { + dbg_printf("'%s': '%s' (0x%p, 0x%p)\n", a, b, a, b); + } + btree_iter(cmdline, iter); + launch_init(cmdline, iofs, rootfs); // We are done here |