tracex2_user.c (6599e683db1bf22fee74302c47e31b9a42a1c3d2) | tracex2_user.c (d4fffba4d04b8d605ff07f1ed987399f6af0ad5b) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2#include <stdio.h> 3#include <unistd.h> 4#include <stdlib.h> 5#include <signal.h> 6#include <string.h> 7 8#include <bpf/bpf.h> --- 109 unchanged lines hidden (view full) --- 118 long key, next_key, value; 119 struct bpf_link *links[2]; 120 struct bpf_program *prog; 121 struct bpf_object *obj; 122 char filename[256]; 123 int i, j = 0; 124 FILE *f; 125 | 1// SPDX-License-Identifier: GPL-2.0 2#include <stdio.h> 3#include <unistd.h> 4#include <stdlib.h> 5#include <signal.h> 6#include <string.h> 7 8#include <bpf/bpf.h> --- 109 unchanged lines hidden (view full) --- 118 long key, next_key, value; 119 struct bpf_link *links[2]; 120 struct bpf_program *prog; 121 struct bpf_object *obj; 122 char filename[256]; 123 int i, j = 0; 124 FILE *f; 125 |
126 snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]); | 126 snprintf(filename, sizeof(filename), "%s.bpf.o", argv[0]); |
127 obj = bpf_object__open_file(filename, NULL); 128 if (libbpf_get_error(obj)) { 129 fprintf(stderr, "ERROR: opening BPF object file failed\n"); 130 return 0; 131 } 132 133 /* load BPF program */ 134 if (bpf_object__load(obj)) { --- 53 unchanged lines hidden --- | 127 obj = bpf_object__open_file(filename, NULL); 128 if (libbpf_get_error(obj)) { 129 fprintf(stderr, "ERROR: opening BPF object file failed\n"); 130 return 0; 131 } 132 133 /* load BPF program */ 134 if (bpf_object__load(obj)) { --- 53 unchanged lines hidden --- |