From 5478200c1560ebbb1ac6dcf8d96cf94c3fa3693e Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Tue, 25 Mar 2025 12:36:41 -0600 Subject: lib9p: Remove specialized contexts Now that the validate/unmarshal/marshal functions are all flat, they don't need specialized contexts. --- lib9p/include/lib9p/9p.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib9p/include') diff --git a/lib9p/include/lib9p/9p.h b/lib9p/include/lib9p/9p.h index 35b7ef2..ffac453 100644 --- a/lib9p/include/lib9p/9p.h +++ b/lib9p/include/lib9p/9p.h @@ -159,7 +159,7 @@ static inline void lib9p_stat_assert(struct lib9p_stat stat) { * @return whether there was an error */ bool lib9p_stat_validate(struct lib9p_ctx *ctx, uint32_t net_size, uint8_t *net_bytes, - uint32_t *ret_net_size, ssize_t *ret_host_size); + uint32_t *ret_net_size, ssize_t *ret_host_size); /** * Unmarshal the 9P `net_bytes` into the C struct `ret_obj`. @@ -170,12 +170,10 @@ bool lib9p_stat_validate(struct lib9p_ctx *ctx, uint32_t net_size, uint8_t *net_ * @param ctx : negotiated protocol parameters * @param net_bytes : network-encoded stat structure * - * @return ret_obj : where to put the stat object itself - * @return ret_extra : where to put strings for the stat object - * @return consumed net_bytes + * @return ret : the stat object, must be at least lib9p_stat_validate()->ret_net_size bytes */ -uint32_t lib9p_stat_unmarshal(struct lib9p_ctx *ctx, uint8_t *net_bytes, - struct lib9p_stat *ret_obj, void *ret_extra); +void lib9p_stat_unmarshal(struct lib9p_ctx *ctx, uint8_t *net_bytes, + struct lib9p_stat *ret); /** * Marhsal a `struct lib9p_stat` structure into a byte-array. -- cgit v1.2.3-2-g168b