From 325fea5c57cf7917ff5e633dd28715af84018993 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 29 Nov 2023 15:38:30 +0100 Subject: udebug: add functions for manipulating entry length Can be used to reserve worst case length using udebug_entry_append, then setting the final length using udebug_entry_set_length Signed-off-by: Felix Fietkau --- udebug.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'udebug.h') diff --git a/udebug.h b/udebug.h index d24dbfc..75c2e3f 100644 --- a/udebug.h +++ b/udebug.h @@ -157,6 +157,8 @@ int udebug_entry_printf(struct udebug_buf *buf, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); int udebug_entry_vprintf(struct udebug_buf *buf, const char *fmt, va_list ap) __attribute__ ((format (printf, 2, 0))); +uint16_t udebug_entry_trim(struct udebug_buf *buf, uint16_t len); +void udebug_entry_set_length(struct udebug_buf *buf, uint16_t len); void udebug_entry_add(struct udebug_buf *buf); int udebug_buf_init(struct udebug_buf *buf, size_t entries, size_t size); -- cgit v1.2.3