diff options
| author | Ada Christine <adachristine18@gmail.com> | 2025-02-02 22:33:13 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2025-02-02 22:33:13 +0000 |
| commit | 90c29fdde317c39384011a6ba97077c138f13ad6 (patch) | |
| tree | a76eab90595198802925f8e3e2bd1ea4c87ca24f /boot | |
| parent | 6b9c30f9f35e9094762a96a861f0fa978c8e095d (diff) | |
no wait, cleanup
Diffstat (limited to 'boot')
| -rw-r--r-- | boot/config.h | 2 | ||||
| -rw-r--r-- | boot/main.c | 7 |
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); } |
