summaryrefslogtreecommitdiff
path: root/lib9p/core_tables.h
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-06-06 23:57:00 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-06-06 23:57:00 -0600
commit53d0b11262177cd212803fc9330e055871c348b3 (patch)
treead09857ab8b7a1e0f8c5bddd2b7af0bf093275cc /lib9p/core_tables.h
parentb5a29a4c57f09ed11b4591f99493fd57fdcee593 (diff)
parentb85e2a4c1bc272cb6ede732751beb55906f7e298 (diff)
Merge branch 'lukeshu/error'
Diffstat (limited to 'lib9p/core_tables.h')
-rw-r--r--lib9p/core_tables.h6
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