summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
Diffstat (limited to 'boot')
-rw-r--r--boot/config.h2
-rw-r--r--boot/main.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/boot/config.h b/boot/config.h
index c5769d8..b58bbd1 100644
--- a/boot/config.h
+++ b/boot/config.h
@@ -1,4 +1,4 @@
#pragma once
-#define DEBUG_WAIT
+//#define DEBUG_WAIT
diff --git a/boot/main.c b/boot/main.c
index 55eab00..d040e98 100644
--- a/boot/main.c
+++ b/boot/main.c
@@ -1,5 +1,7 @@
#include "kjarna.h"
#include "fake_syscall.h"
+#include <libc/stdio.h>
+#include <posix/sys/mman.h>
int main(int argc, char **argv)
{
@@ -7,6 +9,9 @@ int main(int argc, char **argv)
(void)argv;
struct kjarna_boot_image boot_image = get_boot_image();
- fake_syscall_start(&boot_image);
+ int result = fake_syscall_start(&boot_image);
+ printf("boot service exited with status %d\nhalting.\n", result);
+ munmap(boot_image.image_buffer.base, boot_image.image_buffer.length);
+ munmap(boot_image.stack_buffer.base, boot_image.stack_buffer.length);
}