summaryrefslogtreecommitdiff
path: root/lib9p
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-12-10 14:46:21 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-12-10 14:46:21 -0700
commit37f062800c05badab4c8787e403f7935afff831f (patch)
tree24381745e0c90407da9ed6ebd80dec030423d510 /lib9p
parent20fffeabddb5754e1c26bb099229df4507265fda (diff)
Start getting lib9p stack analysis dialed in
Diffstat (limited to 'lib9p')
-rw-r--r--lib9p/srv.c6
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)