Skip to content

Commit

Permalink
Add bootparam bindings (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
morr0ne authored Mar 19, 2024
1 parent 7eb9e2c commit 9c7edc4
Show file tree
Hide file tree
Showing 21 changed files with 2,100 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ static_assertions = "1.1.0"
libc = "0.2.100"

[package.metadata.docs.rs]
features = ["default", "ioctl", "netlink", "io_uring", "if_arp", "if_ether", "if_packet", "net", "prctl", "elf", "xdp", "mempolicy", "system", "loop_device"]
features = ["default", "bootparam", "ioctl", "netlink", "io_uring", "if_arp", "if_ether", "if_packet", "net", "prctl", "elf", "xdp", "mempolicy", "system", "loop_device"]
targets = ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu"]

# The rest of this file is auto-generated!
[features]
bootparam = []
errno = []
general = []
if_arp = []
Expand Down
3 changes: 3 additions & 0 deletions gen/modules/bootparam.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#if defined(__i386__) || defined(__x86_64__)
#include <asm/bootparam.h>
#endif
3 changes: 3 additions & 0 deletions src/aarch64/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


3 changes: 3 additions & 0 deletions src/arm/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


3 changes: 3 additions & 0 deletions src/csky/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


72 changes: 72 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ pub mod signal_macros {
pub mod elf;

// The rest of this file is auto-generated!
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "arm")]
#[path = "arm/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "arm")]
#[path = "arm/errno.rs"]
Expand Down Expand Up @@ -263,6 +267,10 @@ pub mod system;
#[cfg(target_arch = "arm")]
#[path = "arm/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "aarch64")]
#[path = "aarch64/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "aarch64")]
#[path = "aarch64/errno.rs"]
Expand Down Expand Up @@ -319,6 +327,10 @@ pub mod system;
#[cfg(target_arch = "aarch64")]
#[path = "aarch64/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "csky")]
#[path = "csky/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "csky")]
#[path = "csky/errno.rs"]
Expand Down Expand Up @@ -375,6 +387,10 @@ pub mod system;
#[cfg(target_arch = "csky")]
#[path = "csky/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "loongarch64")]
#[path = "loongarch64/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "loongarch64")]
#[path = "loongarch64/errno.rs"]
Expand Down Expand Up @@ -431,6 +447,10 @@ pub mod system;
#[cfg(target_arch = "loongarch64")]
#[path = "loongarch64/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "mips")]
#[path = "mips/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "mips")]
#[path = "mips/errno.rs"]
Expand Down Expand Up @@ -487,6 +507,10 @@ pub mod system;
#[cfg(target_arch = "mips")]
#[path = "mips/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "mips64")]
#[path = "mips64/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "mips64")]
#[path = "mips64/errno.rs"]
Expand Down Expand Up @@ -543,6 +567,10 @@ pub mod system;
#[cfg(target_arch = "mips64")]
#[path = "mips64/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "mips32r6")]
#[path = "mips32r6/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "mips32r6")]
#[path = "mips32r6/errno.rs"]
Expand Down Expand Up @@ -599,6 +627,10 @@ pub mod system;
#[cfg(target_arch = "mips32r6")]
#[path = "mips32r6/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "mips64r6")]
#[path = "mips64r6/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "mips64r6")]
#[path = "mips64r6/errno.rs"]
Expand Down Expand Up @@ -655,6 +687,10 @@ pub mod system;
#[cfg(target_arch = "mips64r6")]
#[path = "mips64r6/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "powerpc")]
#[path = "powerpc/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "powerpc")]
#[path = "powerpc/errno.rs"]
Expand Down Expand Up @@ -711,6 +747,10 @@ pub mod system;
#[cfg(target_arch = "powerpc")]
#[path = "powerpc/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "powerpc64")]
#[path = "powerpc64/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "powerpc64")]
#[path = "powerpc64/errno.rs"]
Expand Down Expand Up @@ -767,6 +807,10 @@ pub mod system;
#[cfg(target_arch = "powerpc64")]
#[path = "powerpc64/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "riscv32")]
#[path = "riscv32/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "riscv32")]
#[path = "riscv32/errno.rs"]
Expand Down Expand Up @@ -823,6 +867,10 @@ pub mod system;
#[cfg(target_arch = "riscv32")]
#[path = "riscv32/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "riscv64")]
#[path = "riscv64/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "riscv64")]
#[path = "riscv64/errno.rs"]
Expand Down Expand Up @@ -879,6 +927,10 @@ pub mod system;
#[cfg(target_arch = "riscv64")]
#[path = "riscv64/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "s390x")]
#[path = "s390x/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "s390x")]
#[path = "s390x/errno.rs"]
Expand Down Expand Up @@ -935,6 +987,10 @@ pub mod system;
#[cfg(target_arch = "s390x")]
#[path = "s390x/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "sparc")]
#[path = "sparc/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "sparc")]
#[path = "sparc/errno.rs"]
Expand Down Expand Up @@ -991,6 +1047,10 @@ pub mod system;
#[cfg(target_arch = "sparc")]
#[path = "sparc/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "sparc64")]
#[path = "sparc64/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "sparc64")]
#[path = "sparc64/errno.rs"]
Expand Down Expand Up @@ -1047,6 +1107,10 @@ pub mod system;
#[cfg(target_arch = "sparc64")]
#[path = "sparc64/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(target_arch = "x86")]
#[path = "x86/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(target_arch = "x86")]
#[path = "x86/errno.rs"]
Expand Down Expand Up @@ -1103,6 +1167,10 @@ pub mod system;
#[cfg(target_arch = "x86")]
#[path = "x86/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
#[path = "x86_64/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
#[path = "x86_64/errno.rs"]
Expand Down Expand Up @@ -1159,6 +1227,10 @@ pub mod system;
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
#[path = "x86_64/xdp.rs"]
pub mod xdp;
#[cfg(feature = "bootparam")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
#[path = "x32/bootparam.rs"]
pub mod bootparam;
#[cfg(feature = "errno")]
#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
#[path = "x32/errno.rs"]
Expand Down
3 changes: 3 additions & 0 deletions src/loongarch64/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


3 changes: 3 additions & 0 deletions src/mips/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


3 changes: 3 additions & 0 deletions src/mips32r6/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


3 changes: 3 additions & 0 deletions src/mips64/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


3 changes: 3 additions & 0 deletions src/mips64r6/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


3 changes: 3 additions & 0 deletions src/powerpc/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


3 changes: 3 additions & 0 deletions src/powerpc64/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


3 changes: 3 additions & 0 deletions src/riscv32/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


3 changes: 3 additions & 0 deletions src/riscv64/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


3 changes: 3 additions & 0 deletions src/s390x/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


3 changes: 3 additions & 0 deletions src/sparc/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


3 changes: 3 additions & 0 deletions src/sparc64/bootparam.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* automatically generated by rust-bindgen 0.66.1 */


Loading

0 comments on commit 9c7edc4

Please sign in to comment.