mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
BTF-playground: btf_module_ids is only interested in kernel BTF
Skip BTF IDs that doesn't originate from the kernel as this program are looking for kernel module BTF. Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com>
This commit is contained in:
@@ -217,6 +217,9 @@ int find_btf_id_by_name(const char *btf_name, int *btf_size)
|
||||
if (info.name_len == 0) /* Skip non/empty names */
|
||||
continue;
|
||||
|
||||
if (info.kernel_btf == 0) /* Looking for kernel module BTF */
|
||||
continue;
|
||||
|
||||
name = u64_to_ptr(info.name);
|
||||
if (strncmp(name, btf_name, 127) == 0) {
|
||||
|
||||
|
Reference in New Issue
Block a user