From 24a331cb177327b3b4a30064150cd99c469a1d11 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Wed, 2 Apr 2025 16:41:26 -0600 Subject: lib9p: Split internal.h up, rename some CONFIG symbols --- lib9p/include/lib9p/9p.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib9p/include') diff --git a/lib9p/include/lib9p/9p.h b/lib9p/include/lib9p/9p.h index ffac453..4cdb997 100644 --- a/lib9p/include/lib9p/9p.h +++ b/lib9p/include/lib9p/9p.h @@ -18,6 +18,7 @@ #ifndef CONFIG_9P_MAX_ERR_SIZE #error config.h must define CONFIG_9P_MAX_ERR_SIZE #endif +static_assert(CONFIG_9P_MAX_ERR_SIZE <= UINT16_MAX); /* constants ******************************************************************/ @@ -60,6 +61,10 @@ int lib9p_error(struct lib9p_ctx *ctx, lib9p_errno_t linux_errno, char const *ms /** Write a printf-style error into ctx, return -1. */ int lib9p_errorf(struct lib9p_ctx *ctx, lib9p_errno_t linux_errno, char const *fmt, ...) [[gnu::format(printf, 3, 4)]]; +/* misc utilities *************************************************************/ + +uint32_t lib9p_version_min_msg_size(enum lib9p_version); + /* main T-message functions ***************************************************/ /** -- cgit v1.2.3-2-g168b