From 7861a52adf92a083bb2aed4c35f98d8035dce032 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Mon, 7 Jul 2025 13:22:53 +0200 Subject: Setup project skeleton --- src/main.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 99d4c95..3a28e28 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,5 @@ /* - * wanix, a Unix-like operating system for WebAssembly + * wnix, 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 . */ -#include -#include -#include +#include +#include +#include #include -#include int main(void) { - int ret = EXIT_FAILURE; - struct aio *aio = aio_open("/media/cdrom/", "rb"); + if (init_port() || 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; } -- cgit v1.2.3