diff options
Diffstat (limited to 'lib9p/include')
-rw-r--r-- | lib9p/include/lib9p/9p.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib9p/include/lib9p/9p.h b/lib9p/include/lib9p/9p.h index 1e1667d..2511e3d 100644 --- a/lib9p/include/lib9p/9p.h +++ b/lib9p/include/lib9p/9p.h @@ -37,19 +37,23 @@ struct lib9p_ctx { uint32_t max_msg_size; /* state */ +#ifdef CONFIG_9P_ENABLE_9P2000_u uint32_t err_num; +#endif char err_msg[CONFIG_9P_MAX_ERR_SIZE]; }; static void lib9p_ctx_clear_error(struct lib9p_ctx *ctx) { assert(ctx); +#ifdef CONFIG_9P_ENABLE_9P2000_u ctx->err_num = 0; +#endif ctx->err_msg[0] = '\0'; } static bool lib9p_ctx_has_error(struct lib9p_ctx *ctx) { assert(ctx); - return ctx->err_num || ctx->err_msg[0]; + return ctx->err_msg[0]; } /** Write an static error into ctx, return -1. */ |