diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-04 16:43:55 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-04 16:43:55 -0600 |
commit | b683e779ef83b88f6ffc503a1d1a4f3ec25a5cfa (patch) | |
tree | badfd2670fdccc471883840c27b5a9bfc5b4b92a /lib9p/9p.c | |
parent | 6cb0e025b973c60bcaa1506b92087dd963e45d31 (diff) |
wip srv
Diffstat (limited to 'lib9p/9p.c')
-rw-r--r-- | lib9p/9p.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -23,6 +23,11 @@ uint32_t lib9p_ctx_max_msg_size(struct lib9p_ctx *ctx) { return ctx->max_msg_size; } +bool lib9p_ctx_has_error(struct lib9p_ctx *ctx) { + assert(ctx); + return ctx->err_num || ctx->err_msg[0]; +} + int lib9p_error(struct lib9p_ctx *ctx, uint32_t linux_errno, char const *msg) { strncpy(ctx->err_msg, msg, sizeof(ctx->err_msg)); ctx->err_msg[sizeof(ctx->err_msg)-1] = '\0'; |