diff options
author | dzwdz | 2024-02-21 20:10:48 +0100 |
---|---|---|
committer | dzwdz | 2024-02-21 20:10:48 +0100 |
commit | 4b8f771d6ec926f95ec017c427348013d4c1872c (patch) | |
tree | 885bcfc2328206faf6398c50532a770ffee92a5a /src | |
parent | 7f6686177af7279fb9465df25b2c1295ce1aeaa2 (diff) |
user/*: remove some minor header-related TODOs
pretty useless, but the list of all the TODOs is getting unwieldy, so I might
as well cross some crap off that list
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/ext2fs/main.c | 1 | ||||
-rw-r--r-- | src/cmd/netdog.c | 5 | ||||
-rw-r--r-- | src/cmd/shell/shell.c | 1 | ||||
-rw-r--r-- | src/libc/_start2.c | 3 | ||||
-rw-r--r-- | src/libc/include/unistd.h | 3 |
5 files changed, 7 insertions, 6 deletions
diff --git a/src/cmd/ext2fs/main.c b/src/cmd/ext2fs/main.c index 12ef3bc..1099df6 100644 --- a/src/cmd/ext2fs/main.c +++ b/src/cmd/ext2fs/main.c @@ -5,6 +5,7 @@ #include <camellia/fs/dir.h> #include <camellia/fs/misc.h> #include <camellia/fsutil.h> +#include <camellia/intr.h> #include <camellia/syscalls.h> #include <err.h> #include <errno.h> diff --git a/src/cmd/netdog.c b/src/cmd/netdog.c index 221dc9c..e01b66f 100644 --- a/src/cmd/netdog.c +++ b/src/cmd/netdog.c @@ -11,8 +11,7 @@ hid_t conn; void send_stdin(void *arg) { (void)arg; static char buf[4096]; for (;;) { - // TODO define STDIN_FILENO - long ret = _sys_read(0, buf, sizeof buf, -1); + long ret = _sys_read(STDIN_FILENO, buf, sizeof buf, -1); if (ret <= 0) return; /* instead of sending an empty packet, quit. */ ret = _sys_write(conn, buf, ret, -1, 0); if (ret < 0) return; @@ -24,7 +23,7 @@ void recv_stdout(void *arg) { (void)arg; for (;;) { long ret = _sys_read(conn, buf, sizeof buf, -1); if (ret < 0) return; - ret = _sys_write(1, buf, ret, -1, 0); + ret = _sys_write(STDOUT_FILENO, buf, ret, -1, 0); if (ret < 0) return; } } diff --git a/src/cmd/shell/shell.c b/src/cmd/shell/shell.c index 724c018..3aeaca1 100644 --- a/src/cmd/shell/shell.c +++ b/src/cmd/shell/shell.c @@ -4,6 +4,7 @@ #include <camellia/compat.h> #include <camellia/flags.h> #include <camellia/fs/misc.h> +#include <camellia/intr.h> #include <camellia/syscalls.h> #include <err.h> #include <errno.h> diff --git a/src/libc/_start2.c b/src/libc/_start2.c index dbc91d7..2c6b64d 100644 --- a/src/libc/_start2.c +++ b/src/libc/_start2.c @@ -1,11 +1,12 @@ #include <_proc.h> #include <camellia/flags.h> +#include <camellia/intr.h> #include <camellia/syscalls.h> +#include <elfload.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> -#include <elfload.h> int main(int argc, char **argv, char **envp); diff --git a/src/libc/include/unistd.h b/src/libc/include/unistd.h index 41cf0a0..a38d031 100644 --- a/src/libc/include/unistd.h +++ b/src/libc/include/unistd.h @@ -1,6 +1,5 @@ #pragma once -#include <camellia/types.h> // TODO only needed because of hid_t -#include <camellia/intr.h> // TODO only included for backwards compat +#include <camellia/types.h> #include <sys/types.h> #include <getopt.h> |