aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/src/main.c b/src/main.c
index 99d4c95..0d38aba 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,5 +1,5 @@
/*
- * wanix, a Unix-like operating system for WebAssembly
+ * wanix, a Unix-like operating system for WebAssembly applications.
* Copyright (C) 2025 Xavier Del Campo Romero
*
* This program is free software: you can redistribute it and/or modify
@@ -16,31 +16,19 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-#include <aio.h>
-#include <errno.h>
-#include <stdio.h>
+#include <init.h>
+#include <gfx/gfx.h>
+#include <loop.h>
#include <stdlib.h>
-#include <string.h>
int main(void)
{
- int ret = EXIT_FAILURE;
- struct aio *aio = aio_open("/media/cdrom/", "rb");
+ if (init_time() || gfx_init() || init_boot() || init_vfs())
+ return EXIT_FAILURE;
- if (!aio)
- {
- fprintf(stderr, "%s: aio_open failed: %s\n", __func__, strerror(errno));
- goto end;
- }
+ for (;;)
+ if (loop_run())
+ return EXIT_FAILURE;
- ret = EXIT_SUCCESS;
-
-end:
- if (aio && aio_close(aio))
- {
- fprintf(stderr, "%s: aio_close failed: %s\n", __func__, strerror(errno));
- ret = EXIT_FAILURE;
- }
-
- return ret;
+ return EXIT_SUCCESS;
}