mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
tools: bpftool: don't use hex numbers in JSON output
JSON does not accept hex numbers with 0x prefix. Simply print
as decimal numbers, JSON should be primarily machine-readable.
Signed-off-by: Jakub Kicinski <[email protected]>
Reviewed-by: Quentin Monnet <[email protected]>
Fixes: 831a0aafe5 ("tools: bpftool: add JSON output for `bpftool map *` commands")
Signed-off-by: Alexei Starovoitov <[email protected]>
This commit is contained in:
parent
1bfa26ff8c
commit
4b6eca9d68
1 changed files with 1 additions and 1 deletions
|
|
@ -428,7 +428,7 @@ static int show_map_close_json(int fd, struct bpf_map_info *info)
|
|||
jsonw_string_field(json_wtr, "name", info->name);
|
||||
|
||||
jsonw_name(json_wtr, "flags");
|
||||
jsonw_printf(json_wtr, "%#x", info->map_flags);
|
||||
jsonw_printf(json_wtr, "%d", info->map_flags);
|
||||
|
||||
print_dev_json(info->ifindex, info->netns_dev, info->netns_ino);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue