mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
bpf-link-hang: Adjust for newer libbpf API
bpf_object__find_program_by_title’ is deprecated: libbpf v0.7+: use bpf_object__find_program_by_name() instead See: https://github.com/libbpf/libbpf/issues/297 libbpf#297 Deprecate bpf_program__title() in favor of bpf_program__section_name(). “Title” term is confusing and unconventional, it’s SEC() in code and “section name” everywhere else. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
This commit is contained in:
@@ -29,8 +29,8 @@ int main()
|
|||||||
if (bpf_object__load(obj_target))
|
if (bpf_object__load(obj_target))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
target = bpf_object__find_program_by_title(obj_target, "xdp/pass");
|
target = bpf_object__find_program_by_name(obj_target, "xdp_pass");
|
||||||
prog = bpf_object__find_program_by_title(obj_prog, "xdp/pass");
|
prog = bpf_object__find_program_by_name(obj_prog, "xdp_pass");
|
||||||
|
|
||||||
if (!target || !prog)
|
if (!target || !prog)
|
||||||
goto out;
|
goto out;
|
||||||
|
Reference in New Issue
Block a user