From f263b08d4457e36126f150566219472f3a05c906 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Mon, 16 Dec 2024 14:56:05 -0500 Subject: lib9p: Rename `lib9p_*_stat()` to `lib9p_stat_*()` for consistency --- lib9p/9p.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib9p/9p.c') diff --git a/lib9p/9p.c b/lib9p/9p.c index 8f3ae78..ecb75fd 100644 --- a/lib9p/9p.c +++ b/lib9p/9p.c @@ -185,7 +185,7 @@ bool lib9p_Rmsg_marshal(struct lib9p_ctx *ctx, enum lib9p_msg_type typ, void *bo /* `struct lib9p_stat` helpers ************************************************/ -bool lib9p_validate_stat(struct lib9p_ctx *ctx, uint32_t net_size, uint8_t *net_bytes, +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) { struct _validate_ctx subctx = { .ctx = ctx, @@ -195,7 +195,7 @@ bool lib9p_validate_stat(struct lib9p_ctx *ctx, uint32_t net_size, uint8_t *net_ .net_offset = 0, .host_extra = 0, }; - if (_lib9p_validate_stat(&subctx)) + if (_lib9p_stat_validate(&subctx)) return true; if (ret_net_size) *ret_net_size = subctx.net_offset; @@ -205,7 +205,7 @@ bool lib9p_validate_stat(struct lib9p_ctx *ctx, uint32_t net_size, uint8_t *net_ return false; } -uint32_t lib9p_unmarshal_stat(struct lib9p_ctx *ctx, uint8_t *net_bytes, +uint32_t lib9p_stat_unmarshal(struct lib9p_ctx *ctx, uint8_t *net_bytes, struct lib9p_stat *ret_obj, void *ret_extra) { struct _unmarshal_ctx subctx = { .ctx = ctx, @@ -214,11 +214,11 @@ uint32_t lib9p_unmarshal_stat(struct lib9p_ctx *ctx, uint8_t *net_bytes, .extra = ret_extra, }; - _lib9p_unmarshal_stat(&subctx, ret_obj); + _lib9p_stat_unmarshal(&subctx, ret_obj); return subctx.net_offset; } -uint32_t lib9p_marshal_stat(struct lib9p_ctx *ctx, uint32_t max_net_size, struct lib9p_stat *obj, +uint32_t lib9p_stat_marshal(struct lib9p_ctx *ctx, uint32_t max_net_size, struct lib9p_stat *obj, uint8_t *ret_bytes) { struct lib9p_ctx _ctx = *ctx; _ctx.max_msg_size = max_net_size; @@ -227,7 +227,7 @@ uint32_t lib9p_marshal_stat(struct lib9p_ctx *ctx, uint32_t max_net_size, struct .net_bytes = ret_bytes, .net_offset = 0, }; - if (_lib9p_marshal_stat(&subctx, obj)) + if (_lib9p_stat_marshal(&subctx, obj)) return 0; return subctx.net_offset; } -- cgit v1.2.3-2-g168b