diff options
author | Martin KaFai Lau <kafai@fb.com> | 2018-04-19 01:56:00 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-04-19 22:46:25 +0300 |
commit | b00b8daec828dd59af7d1f7a42acd6e5867f80c6 (patch) | |
tree | 7b66e5f4fb01c891dcb0c62b2e7239efd912d66c /include/linux/btf.h | |
parent | 179cde8cef7e88fc7c0f00c3f23482720d8c4a21 (diff) | |
download | linux-b00b8daec828dd59af7d1f7a42acd6e5867f80c6.tar.xz |
bpf: btf: Add pretty print capability for data with BTF type info
This patch adds pretty print capability for data with BTF type info.
The current usage is to allow pretty print for a BPF map.
The next few patches will allow a read() on a pinned map with BTF
type info for its key and value.
This patch uses the seq_printf() infra.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Alexei Starovoitov <ast@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/linux/btf.h')
-rw-r--r-- | include/linux/btf.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/btf.h b/include/linux/btf.h index f14b60368753..d8bdab0280ba 100644 --- a/include/linux/btf.h +++ b/include/linux/btf.h @@ -33,5 +33,7 @@ struct btf_type; const struct btf_type *btf_type_id_size(const struct btf *btf, u32 *type_id, u32 *ret_size); +void btf_type_seq_show(const struct btf *btf, u32 type_id, void *obj, + struct seq_file *m); #endif |