summaryrefslogtreecommitdiff
path: root/lib9p/include
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-03-25 12:36:41 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-03-25 12:43:16 -0600
commit5478200c1560ebbb1ac6dcf8d96cf94c3fa3693e (patch)
tree23a2ecef774a66eca64ccac067b7d252bb0487d4 /lib9p/include
parentbb14e1f16b5d42934e55c7a53117cf50e1153188 (diff)
lib9p: Remove specialized contexts
Now that the validate/unmarshal/marshal functions are all flat, they don't need specialized contexts.
Diffstat (limited to 'lib9p/include')
-rw-r--r--lib9p/include/lib9p/9p.h10
1 files changed, 4 insertions, 6 deletions
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.