Thread (73 messages) 73 messages, 7 authors, 2022-03-15

[PATCH bpf-next v2 28/28] samples/bpf: fix bpf_program__attach_hid() api change

flat view
STALE1668d

From: Benjamin Tissoires <hidden>
Date: 2022-03-04 17:36:12
Also in: bpf, linux-kselftest, lkml, netdev
Subsystem: bpf [general] (safe dynamic programs and tools), the rest · Maintainers: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Eduard Zingerman, Kumar Kartikeya Dwivedi, Linus Torvalds

Add the new flag parameter.

Signed-off-by: Benjamin Tissoires <redacted>

---

new in v2
---
 samples/bpf/hid_mouse_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/hid_mouse_user.c b/samples/bpf/hid_mouse_user.c
index d4f37caca2fa..bfae25e7b659 100644
--- a/samples/bpf/hid_mouse_user.c
+++ b/samples/bpf/hid_mouse_user.c
@@ -98,7 +98,7 @@ int main(int argc, char **argv)
 	bpf_object__for_each_program(prog, obj) {
 		progs[prog_count].fd = bpf_program__fd(prog);
 		progs[prog_count].type = bpf_program__get_expected_attach_type(prog);
-		progs[prog_count].link = bpf_program__attach_hid(prog, sysfs_fd);
+		progs[prog_count].link = bpf_program__attach_hid(prog, sysfs_fd, 0);
 		if (libbpf_get_error(progs[prog_count].link)) {
 			fprintf(stderr, "bpf_prog_attach: err=%m\n");
 			progs[prog_count].fd = 0;
-- 
2.35.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help