From d7d2d8dcae508660076304f3ff47d85d289881d5 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Thu, 1 May 2025 19:56:30 -0400 Subject: add some warnings so i know what the fuck is going wrong, bah --- kernel/main.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'kernel') diff --git a/kernel/main.c b/kernel/main.c index 72a6668..52f832b 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -28,19 +28,26 @@ void load_init(void) struct file *file; const char *init_vector[] = { NULL }; - if (pcb_alloc(&init_pcb)) + if (pcb_alloc(&init_pcb)) { + WARN("failed to alloc init pcb"); return; + } // get root fs fs = fs_get_root_file_system(); - if (fs == NULL) + if (fs == NULL) { + WARN("failed to get root fs"); return; + } // get init bin - if (fs->open(fs, "bin/init", O_RDONLY, &file)) + if (fs->open(fs, "bin/init", O_RDONLY, &file)) { + WARN("cannot find init elf"); return; + } if (user_load(init_pcb, file, init_vector, kernel_mem_ctx)) { + WARN("init elf failed to load! bad bad BAD!!"); file->close(file); return; } -- cgit v1.2.3-freya