CVSROOT: /cvs Module name: src Changes by: clau...@cvs.openbsd.org 2025/06/04 03:03:05
Modified files: lib/libutil : Symbols.map ibuf_add.3 imsg-buffer.c imsg.c imsg.h imsg_init.3 Log message: Implement following new helper functions: ibuf_add_strbuf, ibuf_get_strbuf functions to insert or parse a fixed size string buffer. These function ensure that the returned string is always NUL terminated and return errors (errno EOVERFLOW) when the string is truncated to fit into the buffer. Two new convenience functions for imsg parsing imsg_get_buf() and imsg_get_strbuf(). The first simply wraps ibuf_get() and the latter ibuf_get_strbuf(). imsg_get_buf() is like imsg_get_data() but does not enforce that all data has to be pulled in one go. Two functions to adjust the max payload of a buffer: imsg_set_maxsize() and ibuf_set_maxsize(). Align imsgbuf_set_maxsize() with imsg_set_maxsize() and use the payload size (excluding the IMSG_HEADER_SIZE). man page updates by tb@ OK tb@