]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bpftool: Using the right format specifiers
authorJiayuan Chen <jiayuan.chen@linux.dev>
Tue, 11 Mar 2025 11:28:09 +0000 (19:28 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 17 Mar 2025 20:50:56 +0000 (13:50 -0700)
commit3775be3417cc3243b0df0492bd308559dcf0560b
tree33f45a2bcc436b5864e1676b3c2816b406bdfc7d
parent8d86767be9c9b94f196e663e0ca88e2eb604a20e
bpftool: Using the right format specifiers

Fixed some formatting specifiers errors, such as using %d for int and %u
for unsigned int, as well as other byte-length types.

Perform type cast using the type derived from the data type itself, for
example, if it's originally an int, it will be cast to unsigned int if
forced to unsigned.

Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250311112809.81901-3-jiayuan.chen@linux.dev
12 files changed:
kernel/bpf/disasm.c
tools/bpf/bpftool/btf.c
tools/bpf/bpftool/btf_dumper.c
tools/bpf/bpftool/cgroup.c
tools/bpf/bpftool/common.c
tools/bpf/bpftool/jit_disasm.c
tools/bpf/bpftool/map_perf_ring.c
tools/bpf/bpftool/net.c
tools/bpf/bpftool/netlink_dumper.c
tools/bpf/bpftool/prog.c
tools/bpf/bpftool/tracelog.c
tools/bpf/bpftool/xlated_dumper.c