]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tools/nolibc: allow limiting of printf destination size
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Fri, 11 Apr 2025 09:00:50 +0000 (11:00 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Tue, 22 Apr 2025 08:59:03 +0000 (10:59 +0200)
commit9f4a2e28bc4714487d9a0c85af2a87c07155c552
tree173388bd89ec4c082b8f2c2410c6a20e49027eb3
parentf7b3eeffd402c5eec32be9c3bfdeb3ec03e87cf3
tools/nolibc: allow limiting of printf destination size

snprintf() allows limiting the output buffer, while still returning the
number of all bytes that would have been written.
Implement the limitation logic in preparation for snprintf().

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Willy Tarreau <w@1wt.eu>
tools/include/nolibc/stdio.h