diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-07-07 13:22:53 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-11-11 00:08:15 +0100 |
| commit | 7861a52adf92a083bb2aed4c35f98d8035dce032 (patch) | |
| tree | 28cd3c40e4c878f730f5df3c1d93bdf91af490c3 /src/main.c | |
| parent | 7fc48e9216ff809da5f8055a50b0be17628ef1df (diff) | |
| download | wnix-7861a52adf92a083bb2aed4c35f98d8035dce032.tar.gz | |
Setup project skeleton
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 32 |
1 files changed, 10 insertions, 22 deletions
@@ -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 <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_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; } |
