From e8c6577617bffa4402c07c7aa20e3c24f03c1c20 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 6 Sep 2020 00:48:07 -0400 Subject: program loading, others big kernel additions: paging, elf loading, separate kernel and user page allocation it now properly loads and runs sd0:bin/init.elf still need to determine which disk was booted from, and start the init on that disk --- src/kernel/main2.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/kernel/main2.c') diff --git a/src/kernel/main2.c b/src/kernel/main2.c index 2b85592..27ef8de 100644 --- a/src/kernel/main2.c +++ b/src/kernel/main2.c @@ -5,11 +5,21 @@ static char nbuf2[11]; -static char path_builder[200] = ""; -static uint8_t path_builder_len = 0; +static char path_builder[200]; +static uint8_t path_builder_len; -static char indent_builder[20] = " "; -static uint8_t indent_builder_len = 2; +static char indent_builder[20]; +static uint8_t indent_builder_len; + +void reset_tree() { + path_builder[0] = '\0'; + path_builder_len = 0; + + indent_builder[0] = ' '; + indent_builder[1] = ' '; + indent_builder[2] = '\0'; + indent_builder_len = 2; +} void tree(struct drive *d) { struct directory_content_info infos[100]; -- cgit v1.2.3