From 4b8f771d6ec926f95ec017c427348013d4c1872c Mon Sep 17 00:00:00 2001 From: dzwdz Date: Wed, 21 Feb 2024 20:10:48 +0100 Subject: 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 --- src/cmd/ext2fs/main.c | 1 + src/cmd/netdog.c | 5 ++--- src/cmd/shell/shell.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/cmd') 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 #include #include +#include #include #include #include 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 #include #include +#include #include #include #include -- cgit v1.2.3