From f1fc30411d7d0b65b52a7e9312c8fd20340bd2d2 Mon Sep 17 00:00:00 2001 From: LOU Xun Date: Tue, 15 Jun 2021 17:43:17 +0000 Subject: [PATCH] Fix Bpf::load_file when BTF doesn't exist --- aya/src/bpf.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aya/src/bpf.rs b/aya/src/bpf.rs index 3542b88c..8e9137ad 100644 --- a/aya/src/bpf.rs +++ b/aya/src/bpf.rs @@ -87,7 +87,7 @@ impl Bpf { path: path.to_owned(), error, })?, - Some(Btf::from_sys_fs()?), + Btf::from_sys_fs().ok(), ) }