Skip to content

Commit

Permalink
replace deprecated bpf_program__title with bpf_program__section_name
Browse files Browse the repository at this point in the history
Signed-off-by: Hengqi Chen <[email protected]>
  • Loading branch information
chenhengqi committed May 4, 2021
1 parent e37075d commit 9586e39
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion basic02-prog-by-name/xdp_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static void list_avail_progs(struct bpf_object *obj)

bpf_object__for_each_program(pos, obj) {
if (bpf_program__is_xdp(pos))
printf(" %s\n", bpf_program__title(pos, false));
printf(" %s\n", bpf_program__section_name(pos));
}
}

Expand Down
2 changes: 1 addition & 1 deletion common/common_user_bpf_xdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ struct bpf_object *load_bpf_and_xdp_attach(struct config *cfg)
exit(EXIT_FAIL_BPF);
}

strncpy(cfg->progsec, bpf_program__title(bpf_prog, false), sizeof(cfg->progsec));
strncpy(cfg->progsec, bpf_program__section_name(bpf_prog), sizeof(cfg->progsec));

prog_fd = bpf_program__fd(bpf_prog);
if (prog_fd <= 0) {
Expand Down
2 changes: 1 addition & 1 deletion tracing02-xdp-monitor/trace_load_and_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ static struct bpf_object* load_bpf_and_trace_attach(struct config *cfg)
}

bpf_object__for_each_program(prog, obj) {
const char *sec = bpf_program__title(prog, true);
const char *sec = bpf_program__section_name(prog);
char *tp;

if (!sec) {
Expand Down

0 comments on commit 9586e39

Please sign in to comment.