Prechádzať zdrojové kódy

aya-gen: bump bindgen to 0.59

Alessandro Decina 3 rokov pred
rodič
commit
4fcb1d75b9

+ 2 - 2
aya-gen/Cargo.toml

@@ -5,11 +5,11 @@ authors = ["Alessandro Decina <[email protected]>"]
 edition = "2018"
 
 [dependencies]
-bindgen = "0.57"
+bindgen = "0.59"
 structopt = {version = "0.3", default-features = false }
 anyhow = "1"
 thiserror = "1"
 syn = "1"
 quote = "1"
 proc-macro2 = "1"
-indexmap = "1.6"
+indexmap = "1.6"

+ 1 - 1
aya-gen/src/btf_types.rs

@@ -34,7 +34,7 @@ pub fn generate<T: AsRef<str>>(
     bindgen = bindgen.header_contents("kernel_types.h", &c_header);
 
     for ty in types {
-        bindgen = bindgen.whitelist_type(ty);
+        bindgen = bindgen.allowlist_type(ty);
     }
 
     let bindings = bindgen.generate().or(Err(Error::Bindgen))?.to_string();

+ 5 - 5
xtask/src/codegen/aya.rs

@@ -40,7 +40,7 @@ fn codegen_internal_btf_bindings(opts: &Options) -> Result<(), anyhow::Error> {
     let types = ["bpf_core_relo", "btf_ext_header"];
 
     for x in &types {
-        bindgen = bindgen.whitelist_type(x);
+        bindgen = bindgen.allowlist_type(x);
     }
 
     let bindings = bindgen
@@ -154,10 +154,10 @@ fn codegen_bindings(opts: &Options) -> Result<(), anyhow::Error> {
         let mut bindgen = builder();
 
         for x in &types {
-            bindgen = bindgen.whitelist_type(x);
+            bindgen = bindgen.allowlist_type(x);
         }
         for x in &vars {
-            bindgen = bindgen.whitelist_var(x);
+            bindgen = bindgen.allowlist_var(x);
         }
 
         // FIXME: this stuff is probably debian/ubuntu specific
@@ -174,11 +174,11 @@ fn codegen_bindings(opts: &Options) -> Result<(), anyhow::Error> {
         };
 
         for x in &types {
-            bindgen = bindgen.whitelist_type(x);
+            bindgen = bindgen.allowlist_type(x);
         }
 
         for x in &vars {
-            bindgen = bindgen.whitelist_var(x);
+            bindgen = bindgen.allowlist_var(x);
         }
 
         let bindings = bindgen

+ 3 - 3
xtask/src/codegen/aya_bpf_bindings.rs

@@ -55,15 +55,15 @@ pub fn codegen(opts: &Options) -> Result<(), anyhow::Error> {
         let vars = ["BPF_.*", "bpf_.*", "TC_ACT_.*", "SOL_SOCKET", "SO_.*"];
 
         for x in &types {
-            bindgen = bindgen.whitelist_type(x);
+            bindgen = bindgen.allowlist_type(x);
         }
 
         // we define our own version which is compatible with both libbpf and
         // iproute2
-        bindgen = bindgen.blacklist_type("bpf_map_def");
+        bindgen = bindgen.blocklist_type("bpf_map_def");
 
         for x in &vars {
-            bindgen = bindgen.whitelist_var(x);
+            bindgen = bindgen.allowlist_var(x);
         }
 
         bindgen