summaryrefslogtreecommitdiff
path: root/lib9p/include
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-12-16 14:56:05 -0500
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-01-11 23:34:14 -0700
commitf263b08d4457e36126f150566219472f3a05c906 (patch)
treed699f327bb9ab53b6e110dcc878afbe9c290551e /lib9p/include
parentc3b9d7e802d7d2e31131692d621515ac88178ebb (diff)
lib9p: Rename `lib9p_*_stat()` to `lib9p_stat_*()` for consistency
Diffstat (limited to 'lib9p/include')
-rw-r--r--lib9p/include/lib9p/9p.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib9p/include/lib9p/9p.h b/lib9p/include/lib9p/9p.h
index 3d89370..72a8292 100644
--- a/lib9p/include/lib9p/9p.h
+++ b/lib9p/include/lib9p/9p.h
@@ -130,7 +130,7 @@ bool lib9p_Rmsg_marshal(struct lib9p_ctx *ctx, enum lib9p_msg_type typ, void *bo
/* `struct lib9p_stat` helpers ************************************************/
/** Assert that a `struct lib9p_stat` object looks valid. */
-static inline void lib9p_assert_stat(struct lib9p_stat stat) {
+static inline void lib9p_stat_assert(struct lib9p_stat stat) {
assert( ((bool)(stat.file_mode & LIB9P_DM_DIR )) == ((bool)(stat.file_qid.type & LIB9P_QT_DIR )) );
assert( ((bool)(stat.file_mode & LIB9P_DM_APPEND )) == ((bool)(stat.file_qid.type & LIB9P_QT_APPEND )) );
assert( ((bool)(stat.file_mode & LIB9P_DM_EXCL )) == ((bool)(stat.file_qid.type & LIB9P_QT_EXCL )) );
@@ -144,10 +144,10 @@ static inline void lib9p_assert_stat(struct lib9p_stat stat) {
* TODO
*
* @return ret_net_size: number of bytes consumed; <=net_size
- * @return ret_host_size: number of bytes that lib9p_unmarshal_stat would take
+ * @return ret_host_size: number of bytes that lib9p_stat_unmarshal would take
* @return whether there was an error
*/
-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);
/**
@@ -157,14 +157,14 @@ bool lib9p_validate_stat(struct lib9p_ctx *ctx, uint32_t net_size, uint8_t *net_
* @return ret_extra : where to put strings for the stat object
* @return consumed net_bytes
*/
-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);
/**
* @return ret_bytes: the buffer to encode into
* @return the number of bytes written, or 0 if the stat object does not fit in max_net_size
*/
-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);
#endif /* _LIB9P_9P_H_ */