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-07-25 14:16:41 +0200 |
| commit | 14f60e4fd65c42f126eaee7e09cb4251c167c6ed (patch) | |
| tree | 313b5e16d7d99cf1518c953e2efe5e5fc920dfbf /src/main.c | |
| parent | 48a61c16eaa6dcfc75d00dba302537ce1492db98 (diff) | |
| download | wnix-14f60e4fd65c42f126eaee7e09cb4251c167c6ed.tar.gz | |
wiptty
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 + * 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; } |
