summaryrefslogtreecommitdiff
path: root/lib9p/9p.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-11 11:37:40 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-11 12:23:25 -0600
commit28f87fcb1823bb36b9a2e492cf840340f9671036 (patch)
treed64a784c7481709847c2f0998be23e1d5d8f3671 /lib9p/9p.c
parent2145808d29f495cf872d9b3ffe05420ff9fc5be6 (diff)
lib9p: Mark what I intend to complete
Diffstat (limited to 'lib9p/9p.c')
-rw-r--r--lib9p/9p.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib9p/9p.c b/lib9p/9p.c
index 832ae82..a008ccc 100644
--- a/lib9p/9p.c
+++ b/lib9p/9p.c
@@ -18,7 +18,13 @@ int lib9p_error(struct lib9p_ctx *ctx, uint32_t linux_errno, char const *msg) {
return -1;
strncpy(ctx->err_msg, msg, sizeof(ctx->err_msg));
ctx->err_msg[sizeof(ctx->err_msg)-1] = '\0';
+
+#ifdef CONFIG_9P_ENABLE_9P2000_u
ctx->err_num = linux_errno;
+#else
+ (void)(linux_errno);
+#endif
+
return -1;
}
@@ -34,7 +40,11 @@ int lib9p_errorf(struct lib9p_ctx *ctx, uint32_t linux_errno, char const *fmt, .
if ((size_t)(n+1) < sizeof(ctx->err_msg))
memset(&ctx->err_msg[n+1], 0, sizeof(ctx->err_msg)-(n+1));
+#ifdef CONFIG_9P_ENABLE_9P2000_u
ctx->err_num = linux_errno;
+#else
+ (void)(linux_errno);
+#endif
return -1;
}