Lines Matching +full:sig +full:- +full:dir
1 // SPDX-License-Identifier: GPL-2.0-only
4 * This is a pure HID-BPF example, and should be considered as such:
35 static void int_exit(int sig) in int_exit() argument
47 "This program will upload and attach a HID-BPF program to the given device.\n" in usage()
51 "Hit Ctrl-C to unbind the program and reset the device\n"); in usage()
56 const char *str_id, *dir; in get_hid_id() local
61 snprintf(uevent, sizeof(uevent) - 1, "%s/uevent", path); in get_hid_id()
65 return -ENOENT; in get_hid_id()
69 dir = basename((char *)path); in get_hid_id()
71 str_id = dir + sizeof("0003:0001:0A37."); in get_hid_id()
84 while ((opt = getopt(argc, argv, optstr)) != -1) { in main()
106 return -1; in main()
115 skel->struct_ops.mouse_invert->hid_id = hid_id; in main()
119 fprintf(stderr, "can not load HID-BPF program: %m\n"); in main()
123 link = bpf_map__attach_struct_ops(skel->maps.mouse_invert); in main()
125 fprintf(stderr, "can not attach HID-BPF program: %m\n"); in main()