瀏覽代碼

Fix Bpf::load_file when BTF doesn't exist

LOU Xun 3 年之前
父節點
當前提交
f1fc304
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      aya/src/bpf.rs

+ 1 - 1
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(),
         )
     }