File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -5192,18 +5192,21 @@ size_t bpf_core_essential_name_len(const char *name)
5192
5192
return n ;
5193
5193
}
5194
5194
5195
- static void bpf_core_free_cands (struct bpf_core_cand_list * cands )
5195
+ void bpf_core_free_cands (struct bpf_core_cand_list * cands )
5196
5196
{
5197
+ if (!cands )
5198
+ return ;
5199
+
5197
5200
free (cands -> cands );
5198
5201
free (cands );
5199
5202
}
5200
5203
5201
- static int bpf_core_add_cands (struct bpf_core_cand * local_cand ,
5202
- size_t local_essent_len ,
5203
- const struct btf * targ_btf ,
5204
- const char * targ_btf_name ,
5205
- int targ_start_id ,
5206
- struct bpf_core_cand_list * cands )
5204
+ int bpf_core_add_cands (struct bpf_core_cand * local_cand ,
5205
+ size_t local_essent_len ,
5206
+ const struct btf * targ_btf ,
5207
+ const char * targ_btf_name ,
5208
+ int targ_start_id ,
5209
+ struct bpf_core_cand_list * cands )
5207
5210
{
5208
5211
struct bpf_core_cand * new_cands , * cand ;
5209
5212
const struct btf_type * t , * local_t ;
Original file line number Diff line number Diff line change @@ -529,4 +529,13 @@ static inline int ensure_good_fd(int fd)
529
529
return fd ;
530
530
}
531
531
532
+ /* The following two functions are exposed to bpftool */
533
+ int bpf_core_add_cands (struct bpf_core_cand * local_cand ,
534
+ size_t local_essent_len ,
535
+ const struct btf * targ_btf ,
536
+ const char * targ_btf_name ,
537
+ int targ_start_id ,
538
+ struct bpf_core_cand_list * cands );
539
+ void bpf_core_free_cands (struct bpf_core_cand_list * cands );
540
+
532
541
#endif /* __LIBBPF_LIBBPF_INTERNAL_H */
You can’t perform that action at this time.
0 commit comments