summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-05-01 19:56:30 -0400
committerFreya Murphy <freya@freyacat.org>2025-05-01 19:56:30 -0400
commitd7d2d8dcae508660076304f3ff47d85d289881d5 (patch)
tree0be0f98312d583b737d7aca2ed2a57d060f3c975 /kernel
parentfix yet another terrible bug, someone please kill me (diff)
downloadcomus-d7d2d8dcae508660076304f3ff47d85d289881d5.tar.gz
comus-d7d2d8dcae508660076304f3ff47d85d289881d5.tar.bz2
comus-d7d2d8dcae508660076304f3ff47d85d289881d5.zip
add some warnings so i know what the fuck is going wrong, bah
Diffstat (limited to 'kernel')
-rw-r--r--kernel/main.c13
1 files changed, 10 insertions, 3 deletions
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;
}