diff options
Diffstat (limited to 'lib9p/core_tables.h')
-rw-r--r-- | lib9p/core_tables.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib9p/core_tables.h b/lib9p/core_tables.h index e3dc8f4..8f8c8d6 100644 --- a/lib9p/core_tables.h +++ b/lib9p/core_tables.h @@ -27,7 +27,7 @@ struct _lib9p_msg_tentry { _print_fn_t print; }; -typedef ssize_t (*_validate_fn_t)(struct lib9p_ctx *ctx, uint32_t net_size, uint8_t *net_bytes); +typedef size_t_or_error (*_validate_fn_t)(struct lib9p_ctx *ctx, uint32_t net_size, uint8_t *net_bytes); typedef void (*_unmarshal_fn_t)(struct lib9p_ctx *ctx, uint8_t *net_bytes, void *out); struct _lib9p_recv_tentry { _validate_fn_t validate; @@ -40,7 +40,7 @@ struct _marshal_ret { size_t net_copied_size; uint8_t *net_copied; }; -typedef bool (*_marshal_fn_t)(struct lib9p_ctx *ctx, void *host_val, struct _marshal_ret *ret); +typedef error (*_marshal_fn_t)(struct lib9p_ctx *ctx, void *host_val, struct _marshal_ret *ret); struct _lib9p_send_tentry { _marshal_fn_t marshal; }; @@ -54,7 +54,7 @@ extern const struct _lib9p_send_tentry _lib9p_table_Rmsg_send[LIB9P_VER_NUM][0x8 /* stat ***********************************************************************/ #if _LIB9P_ENABLE_stat -ssize_t _lib9p_stat_validate(struct lib9p_ctx *ctx, uint32_t net_size, uint8_t *net_bytes, uint32_t *ret_net_size); +size_t_or_error _lib9p_stat_validate(struct lib9p_ctx *ctx, uint32_t net_size, uint8_t *net_bytes, uint32_t *ret_net_size); void _lib9p_stat_unmarshal(struct lib9p_ctx *ctx, uint8_t *net_bytes, void *out); bool _lib9p_stat_marshal(struct lib9p_ctx *ctx, struct lib9p_stat *val, struct _marshal_ret *ret); #endif |