diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-12-13 18:49:15 -0500 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-12-13 18:49:15 -0500 |
commit | c578a300c7d0d46662fcd0bdce69af95a821bc18 (patch) | |
tree | a99de333f2812d7c018820f39d78b8c4e744f705 /lib9p/srv.c | |
parent | 6a719c63ecb83a850c317ea94b8932aa0c857770 (diff) | |
parent | 57cc0523f600575feda09bd9fae13f685ce85b0f (diff) |
Merge commit '57cc0523f600575feda09bd9fae13f685ce85b0f'
Diffstat (limited to 'lib9p/srv.c')
-rw-r--r-- | lib9p/srv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib9p/srv.c b/lib9p/srv.c index 2fb2120..3535f9a 100644 --- a/lib9p/srv.c +++ b/lib9p/srv.c @@ -6,7 +6,6 @@ #include <alloca.h> #include <inttypes.h> /* for PRI* */ -#include <string.h> /* for strerror() */ #include <libcr/coroutine.h> #include <libcr_ipc/chan.h> @@ -14,6 +13,7 @@ #include <libcr_ipc/select.h> #include <libmisc/assert.h> #include <libmisc/vcall.h> +#include <libhw/generic/net.h> #define LOG_NAME 9P_SRV #include <libmisc/log.h> @@ -170,7 +170,7 @@ static void respond_error(struct _lib9p_srv_req *req) { req->net_bytes, decode_u32le(req->net_bytes)); cr_mutex_unlock(&sess->parent_conn->writelock); if (r < 0) - nonrespond_errorf("write: %s", strerror(-r)); + nonrespond_errorf("write: %s", net_strerror(-r)); } /* read coroutine *************************************************************/ @@ -182,7 +182,7 @@ static bool read_at_least(implements_net_stream_conn *fd, uint8_t *buf, size_t g while (*done < goal) { ssize_t r = VCALL(fd, read, &buf[*done], CONFIG_9P_MAX_MSG_SIZE - *done); if (r < 0) { - nonrespond_errorf("read: %s", strerror(-r)); + nonrespond_errorf("read: %s", net_strerror(-r)); return true; } else if (r == 0) { if (*done != 0) |