diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-12-16 14:56:05 -0500 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-01-11 23:34:14 -0700 |
commit | f263b08d4457e36126f150566219472f3a05c906 (patch) | |
tree | d699f327bb9ab53b6e110dcc878afbe9c290551e /lib9p/9p.c | |
parent | c3b9d7e802d7d2e31131692d621515ac88178ebb (diff) |
lib9p: Rename `lib9p_*_stat()` to `lib9p_stat_*()` for consistency
Diffstat (limited to 'lib9p/9p.c')
-rw-r--r-- | lib9p/9p.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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; } |