Skip to content

Commit 9c7edc4

Browse files
authored
Add bootparam bindings (#114)
1 parent 7eb9e2c commit 9c7edc4

21 files changed

Lines changed: 2100 additions & 1 deletion

File tree

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ static_assertions = "1.1.0"
2121
libc = "0.2.100"
2222

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

2727
# The rest of this file is auto-generated!
2828
[features]
29+
bootparam = []
2930
errno = []
3031
general = []
3132
if_arp = []

gen/modules/bootparam.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#if defined(__i386__) || defined(__x86_64__)
2+
#include <asm/bootparam.h>
3+
#endif

src/aarch64/bootparam.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* automatically generated by rust-bindgen 0.66.1 */
2+
3+

src/arm/bootparam.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* automatically generated by rust-bindgen 0.66.1 */
2+
3+

src/csky/bootparam.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* automatically generated by rust-bindgen 0.66.1 */
2+
3+

src/lib.rs

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ pub mod signal_macros {
207207
pub mod elf;
208208

209209
// The rest of this file is auto-generated!
210+
#[cfg(feature = "bootparam")]
211+
#[cfg(target_arch = "arm")]
212+
#[path = "arm/bootparam.rs"]
213+
pub mod bootparam;
210214
#[cfg(feature = "errno")]
211215
#[cfg(target_arch = "arm")]
212216
#[path = "arm/errno.rs"]
@@ -263,6 +267,10 @@ pub mod system;
263267
#[cfg(target_arch = "arm")]
264268
#[path = "arm/xdp.rs"]
265269
pub mod xdp;
270+
#[cfg(feature = "bootparam")]
271+
#[cfg(target_arch = "aarch64")]
272+
#[path = "aarch64/bootparam.rs"]
273+
pub mod bootparam;
266274
#[cfg(feature = "errno")]
267275
#[cfg(target_arch = "aarch64")]
268276
#[path = "aarch64/errno.rs"]
@@ -319,6 +327,10 @@ pub mod system;
319327
#[cfg(target_arch = "aarch64")]
320328
#[path = "aarch64/xdp.rs"]
321329
pub mod xdp;
330+
#[cfg(feature = "bootparam")]
331+
#[cfg(target_arch = "csky")]
332+
#[path = "csky/bootparam.rs"]
333+
pub mod bootparam;
322334
#[cfg(feature = "errno")]
323335
#[cfg(target_arch = "csky")]
324336
#[path = "csky/errno.rs"]
@@ -375,6 +387,10 @@ pub mod system;
375387
#[cfg(target_arch = "csky")]
376388
#[path = "csky/xdp.rs"]
377389
pub mod xdp;
390+
#[cfg(feature = "bootparam")]
391+
#[cfg(target_arch = "loongarch64")]
392+
#[path = "loongarch64/bootparam.rs"]
393+
pub mod bootparam;
378394
#[cfg(feature = "errno")]
379395
#[cfg(target_arch = "loongarch64")]
380396
#[path = "loongarch64/errno.rs"]
@@ -431,6 +447,10 @@ pub mod system;
431447
#[cfg(target_arch = "loongarch64")]
432448
#[path = "loongarch64/xdp.rs"]
433449
pub mod xdp;
450+
#[cfg(feature = "bootparam")]
451+
#[cfg(target_arch = "mips")]
452+
#[path = "mips/bootparam.rs"]
453+
pub mod bootparam;
434454
#[cfg(feature = "errno")]
435455
#[cfg(target_arch = "mips")]
436456
#[path = "mips/errno.rs"]
@@ -487,6 +507,10 @@ pub mod system;
487507
#[cfg(target_arch = "mips")]
488508
#[path = "mips/xdp.rs"]
489509
pub mod xdp;
510+
#[cfg(feature = "bootparam")]
511+
#[cfg(target_arch = "mips64")]
512+
#[path = "mips64/bootparam.rs"]
513+
pub mod bootparam;
490514
#[cfg(feature = "errno")]
491515
#[cfg(target_arch = "mips64")]
492516
#[path = "mips64/errno.rs"]
@@ -543,6 +567,10 @@ pub mod system;
543567
#[cfg(target_arch = "mips64")]
544568
#[path = "mips64/xdp.rs"]
545569
pub mod xdp;
570+
#[cfg(feature = "bootparam")]
571+
#[cfg(target_arch = "mips32r6")]
572+
#[path = "mips32r6/bootparam.rs"]
573+
pub mod bootparam;
546574
#[cfg(feature = "errno")]
547575
#[cfg(target_arch = "mips32r6")]
548576
#[path = "mips32r6/errno.rs"]
@@ -599,6 +627,10 @@ pub mod system;
599627
#[cfg(target_arch = "mips32r6")]
600628
#[path = "mips32r6/xdp.rs"]
601629
pub mod xdp;
630+
#[cfg(feature = "bootparam")]
631+
#[cfg(target_arch = "mips64r6")]
632+
#[path = "mips64r6/bootparam.rs"]
633+
pub mod bootparam;
602634
#[cfg(feature = "errno")]
603635
#[cfg(target_arch = "mips64r6")]
604636
#[path = "mips64r6/errno.rs"]
@@ -655,6 +687,10 @@ pub mod system;
655687
#[cfg(target_arch = "mips64r6")]
656688
#[path = "mips64r6/xdp.rs"]
657689
pub mod xdp;
690+
#[cfg(feature = "bootparam")]
691+
#[cfg(target_arch = "powerpc")]
692+
#[path = "powerpc/bootparam.rs"]
693+
pub mod bootparam;
658694
#[cfg(feature = "errno")]
659695
#[cfg(target_arch = "powerpc")]
660696
#[path = "powerpc/errno.rs"]
@@ -711,6 +747,10 @@ pub mod system;
711747
#[cfg(target_arch = "powerpc")]
712748
#[path = "powerpc/xdp.rs"]
713749
pub mod xdp;
750+
#[cfg(feature = "bootparam")]
751+
#[cfg(target_arch = "powerpc64")]
752+
#[path = "powerpc64/bootparam.rs"]
753+
pub mod bootparam;
714754
#[cfg(feature = "errno")]
715755
#[cfg(target_arch = "powerpc64")]
716756
#[path = "powerpc64/errno.rs"]
@@ -767,6 +807,10 @@ pub mod system;
767807
#[cfg(target_arch = "powerpc64")]
768808
#[path = "powerpc64/xdp.rs"]
769809
pub mod xdp;
810+
#[cfg(feature = "bootparam")]
811+
#[cfg(target_arch = "riscv32")]
812+
#[path = "riscv32/bootparam.rs"]
813+
pub mod bootparam;
770814
#[cfg(feature = "errno")]
771815
#[cfg(target_arch = "riscv32")]
772816
#[path = "riscv32/errno.rs"]
@@ -823,6 +867,10 @@ pub mod system;
823867
#[cfg(target_arch = "riscv32")]
824868
#[path = "riscv32/xdp.rs"]
825869
pub mod xdp;
870+
#[cfg(feature = "bootparam")]
871+
#[cfg(target_arch = "riscv64")]
872+
#[path = "riscv64/bootparam.rs"]
873+
pub mod bootparam;
826874
#[cfg(feature = "errno")]
827875
#[cfg(target_arch = "riscv64")]
828876
#[path = "riscv64/errno.rs"]
@@ -879,6 +927,10 @@ pub mod system;
879927
#[cfg(target_arch = "riscv64")]
880928
#[path = "riscv64/xdp.rs"]
881929
pub mod xdp;
930+
#[cfg(feature = "bootparam")]
931+
#[cfg(target_arch = "s390x")]
932+
#[path = "s390x/bootparam.rs"]
933+
pub mod bootparam;
882934
#[cfg(feature = "errno")]
883935
#[cfg(target_arch = "s390x")]
884936
#[path = "s390x/errno.rs"]
@@ -935,6 +987,10 @@ pub mod system;
935987
#[cfg(target_arch = "s390x")]
936988
#[path = "s390x/xdp.rs"]
937989
pub mod xdp;
990+
#[cfg(feature = "bootparam")]
991+
#[cfg(target_arch = "sparc")]
992+
#[path = "sparc/bootparam.rs"]
993+
pub mod bootparam;
938994
#[cfg(feature = "errno")]
939995
#[cfg(target_arch = "sparc")]
940996
#[path = "sparc/errno.rs"]
@@ -991,6 +1047,10 @@ pub mod system;
9911047
#[cfg(target_arch = "sparc")]
9921048
#[path = "sparc/xdp.rs"]
9931049
pub mod xdp;
1050+
#[cfg(feature = "bootparam")]
1051+
#[cfg(target_arch = "sparc64")]
1052+
#[path = "sparc64/bootparam.rs"]
1053+
pub mod bootparam;
9941054
#[cfg(feature = "errno")]
9951055
#[cfg(target_arch = "sparc64")]
9961056
#[path = "sparc64/errno.rs"]
@@ -1047,6 +1107,10 @@ pub mod system;
10471107
#[cfg(target_arch = "sparc64")]
10481108
#[path = "sparc64/xdp.rs"]
10491109
pub mod xdp;
1110+
#[cfg(feature = "bootparam")]
1111+
#[cfg(target_arch = "x86")]
1112+
#[path = "x86/bootparam.rs"]
1113+
pub mod bootparam;
10501114
#[cfg(feature = "errno")]
10511115
#[cfg(target_arch = "x86")]
10521116
#[path = "x86/errno.rs"]
@@ -1103,6 +1167,10 @@ pub mod system;
11031167
#[cfg(target_arch = "x86")]
11041168
#[path = "x86/xdp.rs"]
11051169
pub mod xdp;
1170+
#[cfg(feature = "bootparam")]
1171+
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
1172+
#[path = "x86_64/bootparam.rs"]
1173+
pub mod bootparam;
11061174
#[cfg(feature = "errno")]
11071175
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
11081176
#[path = "x86_64/errno.rs"]
@@ -1159,6 +1227,10 @@ pub mod system;
11591227
#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
11601228
#[path = "x86_64/xdp.rs"]
11611229
pub mod xdp;
1230+
#[cfg(feature = "bootparam")]
1231+
#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
1232+
#[path = "x32/bootparam.rs"]
1233+
pub mod bootparam;
11621234
#[cfg(feature = "errno")]
11631235
#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
11641236
#[path = "x32/errno.rs"]

src/loongarch64/bootparam.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* automatically generated by rust-bindgen 0.66.1 */
2+
3+

src/mips/bootparam.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* automatically generated by rust-bindgen 0.66.1 */
2+
3+

src/mips32r6/bootparam.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* automatically generated by rust-bindgen 0.66.1 */
2+
3+

src/mips64/bootparam.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* automatically generated by rust-bindgen 0.66.1 */
2+
3+

0 commit comments

Comments
 (0)