diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2023-02-15 00:12:17 +0100 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2023-02-16 15:32:45 -0800 |
commit | c0ca277bb8bc43152d2b2fa60b47a1e1d609da45 (patch) | |
tree | fc7404fd85e6086032e2770c8880a866a3ac9d3c /samples/bpf/xdp_fwd_user.c | |
parent | 38f0408ef756e738387f7d8f62b8d58ca5938da4 (diff) |
samples/bpf: Use bpf_{btf,link,map,prog}_get_info_by_fd()
Use the new type-safe wrappers around bpf_obj_get_info_by_fd().
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230214231221.249277-5-iii@linux.ibm.com
Diffstat (limited to 'samples/bpf/xdp_fwd_user.c')
-rw-r--r-- | samples/bpf/xdp_fwd_user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/bpf/xdp_fwd_user.c b/samples/bpf/xdp_fwd_user.c index 84f57f1209ce..193b3b79b31f 100644 --- a/samples/bpf/xdp_fwd_user.c +++ b/samples/bpf/xdp_fwd_user.c @@ -76,9 +76,9 @@ static int do_detach(int ifindex, const char *ifname, const char *app_name) return prog_fd; } - err = bpf_obj_get_info_by_fd(prog_fd, &prog_info, &info_len); + err = bpf_prog_get_info_by_fd(prog_fd, &prog_info, &info_len); if (err) { - printf("ERROR: bpf_obj_get_info_by_fd failed (%s)\n", + printf("ERROR: bpf_prog_get_info_by_fd failed (%s)\n", strerror(errno)); goto close_out; } |