]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: return previous print callback from libbpf_set_print
authorAndrii Nakryiko <andriin@fb.com>
Sun, 28 Jul 2019 03:25:26 +0000 (20:25 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 28 Jul 2019 05:36:19 +0000 (22:36 -0700)
commit59ac3200f44437b44c455d63a728d889d11a4844
treee503465a3c5227bc9c1872a16139c396e87801e7
parent9a493a93c57bbc7d2835f9e2c63d66973245c49f
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>
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h