aboutsummaryrefslogtreecommitdiff
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorChris J Arges <[email protected]>2022-03-09 15:41:58 -0600
committerDaniel Borkmann <[email protected]>2022-03-11 00:06:11 +0100
commit357b3cc3c0467b2f7cd6c4a87f7a18bfd779ce5b (patch)
treea2220e3df19d2cfcb614a891ad66203eecacd51c /lib/string_helpers.c
parent1b773d0003aa90e60953d263c2ee31e6fb4a8a69 (diff)
bpftool: Ensure bytes_memlock json output is correct
If a BPF map is created over 2^32 the memlock value as displayed in JSON format will be incorrect. Use atoll instead of atoi so that the correct number is displayed. ``` $ bpftool map create /sys/fs/bpf/test_bpfmap type hash key 4 \ value 1024 entries 4194304 name test_bpfmap $ bpftool map list 1: hash name test_bpfmap flags 0x0 key 4B value 1024B max_entries 4194304 memlock 4328521728B $ sudo bpftool map list -j | jq .[].bytes_memlock 33554432 ``` Signed-off-by: Chris J Arges <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions