diff options
Diffstat (limited to 'src/cmd/netdog.c')
-rw-r--r-- | src/cmd/netdog.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; } } |