diff options
Diffstat (limited to 'src/user/app')
-rw-r--r-- | src/user/app/init/driver/ansiterm.c | 2 | ||||
-rw-r--r-- | src/user/app/init/driver/ps2.c | 2 | ||||
-rw-r--r-- | src/user/app/init/driver/termcook.c | 5 | ||||
-rw-r--r-- | src/user/app/init/driver/tmpfs.c | 2 | ||||
-rw-r--r-- | src/user/app/init/main.c | 9 | ||||
-rw-r--r-- | src/user/app/init/shell.c | 8 | ||||
-rw-r--r-- | src/user/app/init/tests/main.c | 6 | ||||
-rw-r--r-- | src/user/app/init/tests/pipe.c | 5 | ||||
-rw-r--r-- | src/user/app/init/tests/semaphore.c | 6 | ||||
-rw-r--r-- | src/user/app/init/tests/stress.c | 4 | ||||
-rw-r--r-- | src/user/app/init/tests/tests.h (renamed from src/user/app/init/tests/main.h) | 2 | ||||
-rw-r--r-- | src/user/app/testelf/main.c | 3 |
12 files changed, 30 insertions, 24 deletions
diff --git a/src/user/app/init/driver/ansiterm.c b/src/user/app/init/driver/ansiterm.c index dde2183..4b66d6f 100644 --- a/src/user/app/init/driver/ansiterm.c +++ b/src/user/app/init/driver/ansiterm.c @@ -1,6 +1,6 @@ +#include "driver.h" #include <camellia/syscalls.h> #include <stdbool.h> -#include <user/app/init/driver/driver.h> struct vga_cell { unsigned char c; diff --git a/src/user/app/init/driver/ps2.c b/src/user/app/init/driver/ps2.c index 45458c8..6aed2fb 100644 --- a/src/user/app/init/driver/ps2.c +++ b/src/user/app/init/driver/ps2.c @@ -1,7 +1,7 @@ +#include "driver.h" #include <camellia/syscalls.h> #include <shared/container/ring.h> #include <stdbool.h> -#include <user/app/init/driver/driver.h> static const char keymap_lower[] = { diff --git a/src/user/app/init/driver/termcook.c b/src/user/app/init/driver/termcook.c index 868d5d3..59cef77 100644 --- a/src/user/app/init/driver/termcook.c +++ b/src/user/app/init/driver/termcook.c @@ -1,6 +1,7 @@ +#include "driver.h" #include <camellia/syscalls.h> -#include <user/app/init/driver/driver.h> -#include <user/lib/stdlib.h> +#include <stdio.h> +#include <unistd.h> static void w_output(handle_t output, const char *buf, size_t len) { size_t pos = 0; diff --git a/src/user/app/init/driver/tmpfs.c b/src/user/app/init/driver/tmpfs.c index 200e62d..83c42c7 100644 --- a/src/user/app/init/driver/tmpfs.c +++ b/src/user/app/init/driver/tmpfs.c @@ -1,7 +1,7 @@ #include <camellia/syscalls.h> #include <shared/mem.h> #include <stddef.h> -#include <user/lib/malloc.h> +#include <stdlib.h> struct node { const char *name; diff --git a/src/user/app/init/main.c b/src/user/app/init/main.c index 772a9e3..9c664a0 100644 --- a/src/user/app/init/main.c +++ b/src/user/app/init/main.c @@ -1,18 +1,15 @@ +#include "driver/driver.h" #include <camellia/flags.h> #include <camellia/syscalls.h> #include <stdint.h> -#include <user/app/init/driver/driver.h> -#include <user/app/init/shell.h> -#include <user/app/init/tests/main.h> +#include <stdio.h> +#include <unistd.h> #include <user/lib/elfload.h> #include <user/lib/fs/misc.h> -#include <user/lib/stdlib.h> __attribute__((visibility("hidden"))) extern char _image_base[]; -void read_file(const char *path, size_t len); - __attribute__((section(".text.startup"))) int main(void) { elf_selfreloc(); diff --git a/src/user/app/init/shell.c b/src/user/app/init/shell.c index 76a0dbc..0c8b9b4 100644 --- a/src/user/app/init/shell.c +++ b/src/user/app/init/shell.c @@ -1,9 +1,11 @@ +#include "shell.h" +#include "tests/tests.h" #include <camellia/syscalls.h> #include <stdbool.h> -#include <user/app/init/shell.h> -#include <user/app/init/tests/main.h> +#include <stdio.h> +#include <string.h> +#include <unistd.h> #include <user/lib/elfload.h> -#include <user/lib/stdlib.h> static bool isspace(char c) { return c == ' ' || c == '\t' || c == '\n'; diff --git a/src/user/app/init/tests/main.c b/src/user/app/init/tests/main.c index 4f8e858..cf59925 100644 --- a/src/user/app/init/tests/main.c +++ b/src/user/app/init/tests/main.c @@ -1,10 +1,12 @@ #define TEST_MACROS +#include "tests.h" #include <camellia/errno.h> #include <camellia/execbuf.h> #include <camellia/flags.h> #include <camellia/syscalls.h> -#include <user/app/init/tests/main.h> -#include <user/lib/stdlib.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> static void run_forked(void (*fn)()) { if (!fork()) { diff --git a/src/user/app/init/tests/pipe.c b/src/user/app/init/tests/pipe.c index 227007a..f7005f8 100644 --- a/src/user/app/init/tests/pipe.c +++ b/src/user/app/init/tests/pipe.c @@ -1,8 +1,9 @@ #define TEST_MACROS +#include "tests.h" #include <camellia/flags.h> #include <camellia/syscalls.h> -#include <user/app/init/tests/main.h> -#include <user/lib/stdlib.h> +#include <string.h> +#include <unistd.h> static const char *pipe_msgs[2] = {"hello", "world"}; diff --git a/src/user/app/init/tests/semaphore.c b/src/user/app/init/tests/semaphore.c index b55db9e..fc0cc10 100644 --- a/src/user/app/init/tests/semaphore.c +++ b/src/user/app/init/tests/semaphore.c @@ -1,9 +1,11 @@ #define TEST_MACROS +#include "tests.h" #include <camellia/flags.h> #include <camellia/syscalls.h> -#include <user/app/init/tests/main.h> +#include <stdio.h> +#include <string.h> +#include <unistd.h> #include <user/lib/esemaphore.h> -#include <user/lib/stdlib.h> static void odd(handle_t out, struct evil_sem *sem1, struct evil_sem *sem2) { _syscall_write(out, "1", 1, -1); diff --git a/src/user/app/init/tests/stress.c b/src/user/app/init/tests/stress.c index f797611..e620f0a 100644 --- a/src/user/app/init/tests/stress.c +++ b/src/user/app/init/tests/stress.c @@ -1,8 +1,8 @@ #define TEST_MACROS +#include "tests.h" #include <camellia/flags.h> #include <camellia/syscalls.h> -#include <user/app/init/tests/main.h> -#include <user/lib/stdlib.h> +#include <unistd.h> static void run_forked(void (*fn)()) { if (!fork()) { diff --git a/src/user/app/init/tests/main.h b/src/user/app/init/tests/tests.h index ed11c5e..23ed1e3 100644 --- a/src/user/app/init/tests/main.h +++ b/src/user/app/init/tests/tests.h @@ -1,4 +1,6 @@ #pragma once +#include <camellia/syscalls.h> +#include <stdio.h> void stress_all(void); void test_all(void); diff --git a/src/user/app/testelf/main.c b/src/user/app/testelf/main.c index 8c5b6a4..de7b965 100644 --- a/src/user/app/testelf/main.c +++ b/src/user/app/testelf/main.c @@ -1,8 +1,7 @@ #include <camellia/syscalls.h> -#include <shared/printf.h> +#include <stdio.h> #include <user/lib/elf.h> #include <user/lib/elfload.h> -#include <user/lib/stdlib.h> const char *str = "Hello!\n", *str2 = "World.\n"; |