mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
e739e01d8d
When dumping a character array, libbpf will watch for a '\0' and set is_array_terminated=true if found. This prevents libbpf from printing the remaining characters of the array, treating it as a nul-terminated string. However, once this flag is set, it's never reset, leading to subsequent characters array not being printed properly: .str_multi = (__u8[2][16])[ [ 'H', 'e', 'l', ], ], This patch saves the is_array_terminated flag and restores its default (false) value before looping over the elements of an array, then restores it afterward. This way, libbpf's behavior is unchanged when dumping the characters of an array, but subsequent arrays are printed properly: .str_multi = (__u8[2][16])[ [ 'H', 'e', 'l', ], [ 'l', 'o', ], ], Signed-off-by: Quentin Deslandes <qde@naccy.de> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20240413211258.134421-3-qde@naccy.de |
||
---|---|---|
.. | ||
api | ||
bpf | ||
perf | ||
subcmd | ||
symbol | ||
thermal | ||
argv_split.c | ||
bitmap.c | ||
ctype.c | ||
find_bit.c | ||
hweight.c | ||
list_sort.c | ||
rbtree.c | ||
slab.c | ||
str_error_r.c | ||
string.c | ||
vsprintf.c | ||
zalloc.c |