diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-04-02 20:44:42 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-04-02 20:44:42 -0600 |
commit | 13b8cafb7e28784f037ecd24876c225ddcf48d76 (patch) | |
tree | 8226b5414ce6f013025372bd40753b88217970d1 /lib9p/include | |
parent | 7a71f8ca21aea7e554e66ddd08eaed073db9c400 (diff) | |
parent | a99e18d00d2aebdb10b8e162525ecae5d107d493 (diff) |
Merge branch 'lukeshu/9p-misc'
Diffstat (limited to 'lib9p/include')
-rw-r--r-- | lib9p/include/lib9p/9p.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 ***************************************************/ /** |