lib/string_helpers: string_get_size() now returns characters wrote
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 25 Apr 2022 19:26:28 +0000 (15:26 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 12 Sep 2023 03:59:47 +0000 (23:59 -0400)
commit83feeb195592b533541ff6399c8084e5b7c59677
treec2aba50ec1f7744723b6ab9b0ba71c2f72ba7c4a
parent7d672f40941a549f72aa5500f9d32b26b3f6ab34
lib/string_helpers: string_get_size() now returns characters wrote

printbuf now needs to know the number of characters that would have been
written if the buffer was too small, like snprintf(); this changes
string_get_size() to return the the return value of snprintf().

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
include/linux/string_helpers.h
lib/string_helpers.c