diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-07-27 20:25:26 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-07-27 22:36:19 -0700 |
commit | e87fd8bae44c3eaa6205c9c81419e773896dc157 (patch) | |
tree | e503465a3c5227bc9c1872a16139c396e87801e7 /tools/lib/bpf/libbpf.h | |
parent | selftests/bpf: add test selectors by number and name to test_progs (diff) | |
download | linux-dev-e87fd8bae44c3eaa6205c9c81419e773896dc157.tar.xz linux-dev-e87fd8bae44c3eaa6205c9c81419e773896dc157.zip |
libbpf: return previous print callback from libbpf_set_print
By returning previously set print callback from libbpf_set_print, it's
possible to restore it, eventually. This is useful when running many
independent test with one default print function, but overriding log
verbosity for particular subset of tests.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/bpf/libbpf.h')
-rw-r--r-- | tools/lib/bpf/libbpf.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h index 5cbf459ece0b..8a9d462a6f6d 100644 --- a/tools/lib/bpf/libbpf.h +++ b/tools/lib/bpf/libbpf.h @@ -57,7 +57,7 @@ enum libbpf_print_level { typedef int (*libbpf_print_fn_t)(enum libbpf_print_level level, const char *, va_list ap); -LIBBPF_API void libbpf_set_print(libbpf_print_fn_t fn); +LIBBPF_API libbpf_print_fn_t libbpf_set_print(libbpf_print_fn_t fn); /* Hide internal to user */ struct bpf_object; |