Skip to content

Commit

Permalink
adjust: bpf_attach_xdp report nicer error
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyuezhou authored and yonghong-song committed May 26, 2021
1 parent b1ebd4f commit 4cca23e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cc/libbpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,7 @@ int bpf_attach_xdp(const char *dev_name, int progfd, uint32_t flags) {
ret = bpf_set_link_xdp_fd(ifindex, progfd, flags);
if (ret) {
libbpf_strerror(ret, err_buf, sizeof(err_buf));
fprintf(stderr, "bpf: Attaching prog to %s: %s", dev_name, err_buf);
fprintf(stderr, "bpf: Attaching prog to %s: %s\n", dev_name, err_buf);
return -1;
}

Expand Down

0 comments on commit 4cca23e

Please sign in to comment.