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 and sunfishcode committed May 17, 2024
1 parent 4ed2dc0 commit 83856da
Show file tree
Hide file tree
Showing 21 changed files with 2,096 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 @@ -190,6 +190,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 @@ -246,6 +250,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 @@ -302,6 +310,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 @@ -358,6 +370,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 @@ -414,6 +430,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 @@ -470,6 +490,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 @@ -526,6 +550,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 @@ -582,6 +610,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 @@ -638,6 +670,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 @@ -694,6 +730,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 @@ -750,6 +790,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 @@ -806,6 +850,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 @@ -862,6 +910,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 @@ -918,6 +970,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 @@ -974,6 +1030,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 @@ -1030,6 +1090,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 @@ -1086,6 +1150,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 @@ -1142,6 +1210,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 83856da

Please sign in to comment.