File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,12 @@ static int verbose = 1;
2323#define EXIT_FAIL_BPF 4
2424#define EXIT_FAIL_BTF 5
2525
26- struct bpf_object * load_bpf_object () {
26+ struct bpf_object * load_bpf_object (const char * filename ) {
2727 struct bpf_object * obj ;
2828 char buf [100 ];
2929 int err ;
3030
31- obj = bpf_object__open_file ("af_xdp_kern.o" , NULL );
31+ obj = bpf_object__open_file (filename , NULL );
3232 err = libbpf_get_error (obj );
3333 if (err ) {
3434 libbpf_strerror (err , buf , sizeof (buf ));
@@ -110,12 +110,14 @@ int init_btf_info_via_bpf_object(struct bpf_object *bpf_obj)
110110 return 0 ;
111111}
112112
113+
114+
113115int main (int argc , char * * argv )
114116{
115117 struct bpf_object * bpf_obj ;
116118 int err = 0 ;
117119
118- bpf_obj = load_bpf_object ();
120+ bpf_obj = load_bpf_object ("af_xdp_kern.o" );
119121 if (!bpf_obj )
120122 return EXIT_FAIL_BPF ;
121123
You can’t perform that action at this time.
0 commit comments