diff options
Diffstat (limited to 'lib9p')
-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) |