[PATCH bpf-next 0/2] bpftool: fix newline for struct with padding only fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Everyone,

a small fix for bpftool, copying commit message from the first patch
as it explains the modification.

An update for `bpftool btf dump file ... format c`.
Add a missing newline print for structures that consist of
anonymous-only padding fields. E.g. here is struct bpf_timer from
vmlinux.h before this patch:

 struct bpf_timer {
 	long: 64;
	long: 64;};

And after this patch:

 struct bpf_dynptr {
 	long: 64;
	long: 64;
 };

Signed-off-by: Eduard Zingerman <eddyz87@xxxxxxxxx>

Eduard Zingerman (2):
  bpftool: fix newline for struct with padding only fields
  selftests/bpf: verify newline for struct with padding only fields

 tools/lib/bpf/btf_dump.c                         | 15 +++++++++------
 .../bpf/progs/btf_dump_test_case_padding.c       | 16 ++++++++++++++++
 2 files changed, 25 insertions(+), 6 deletions(-)

-- 
2.37.3




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux