Skip to content

bpftool: Fix some json formatting for struct_ops

Manu Bretelle bpf 1 version Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpftool: fix printing of pointer valuetools/bpf/bpftool/btf_dumper.c+1 -10 repliesApplied
2/2bpftool: wrap struct_ops dump in an arraytools/bpf/bpftool/struct_ops.c+6 -00 repliesApplied

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEduard ZingermanQuentin Monnet
SeriesA-b A-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH bpf-next 0/2] bpftool: Fix some json formatting for struct_ops

When dumping struct_ops with bpftool, the json produced was invalid.
1) pointer values where not printed with surrounding quotes, causing an invalid json integer to be emitted
2) when bpftool struct_ops dump id <id>, the 2 dictionaries were not wrapped in a array, here also causing an invalid json payload to be emitted.

Manu Bretelle (2):
bpftool: fix printing of pointer value
bpftool: wrap struct_ops dump in an array

 tools/bpf/bpftool/btf_dumper.c | 2 +-
 tools/bpf/bpftool/struct_ops.c | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
2.39.3