This repository has been archived by the owner on Jul 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
/
bootparam.rs
4628 lines (4622 loc) · 129 KB
/
bootparam.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2021-2022 Alibaba Cloud. All Rights Reserved.
// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//
// Portions Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the THIRD-PARTY file.
/*
* automatically generated by rust-bindgen
* From upstream linux arch/x86/include/uapi/asm/bootparam.h at commit:
* 806276b7f07a39a1cc3f38bb1ef5c573d4594a38
*/
#![allow(unused)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(missing_docs)]
#![allow(deref_nullptr)]
/* automatically generated by rust-bindgen 0.59.2 */
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
#[inline]
pub const fn new() -> Self {
__IncompleteArrayField(::std::marker::PhantomData, [])
}
#[inline]
pub fn as_ptr(&self) -> *const T {
self as *const _ as *const T
}
#[inline]
pub fn as_mut_ptr(&mut self) -> *mut T {
self as *mut _ as *mut T
}
#[allow(clippy::missing_safety_doc)]
#[inline]
pub unsafe fn as_slice(&self, len: usize) -> &[T] {
::std::slice::from_raw_parts(self.as_ptr(), len)
}
#[allow(clippy::missing_safety_doc)]
#[inline]
pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
}
}
impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.write_str("__IncompleteArrayField")
}
}
pub const SETUP_NONE: u32 = 0;
pub const SETUP_E820_EXT: u32 = 1;
pub const SETUP_DTB: u32 = 2;
pub const SETUP_PCI: u32 = 3;
pub const SETUP_EFI: u32 = 4;
pub const SETUP_APPLE_PROPERTIES: u32 = 5;
pub const SETUP_JAILHOUSE: u32 = 6;
pub const SETUP_INDIRECT: u32 = 2147483648;
pub const SETUP_TYPE_MAX: u32 = 2147483654;
pub const RAMDISK_IMAGE_START_MASK: u32 = 2047;
pub const RAMDISK_PROMPT_FLAG: u32 = 32768;
pub const RAMDISK_LOAD_FLAG: u32 = 16384;
pub const LOADED_HIGH: u32 = 1;
pub const KASLR_FLAG: u32 = 2;
pub const QUIET_FLAG: u32 = 32;
pub const KEEP_SEGMENTS: u32 = 64;
pub const CAN_USE_HEAP: u32 = 128;
pub const XLF_KERNEL_64: u32 = 1;
pub const XLF_CAN_BE_LOADED_ABOVE_4G: u32 = 2;
pub const XLF_EFI_HANDOVER_32: u32 = 4;
pub const XLF_EFI_HANDOVER_64: u32 = 8;
pub const XLF_EFI_KEXEC: u32 = 16;
pub const XLF_5LEVEL: u32 = 32;
pub const XLF_5LEVEL_ENABLED: u32 = 64;
pub const __BITS_PER_LONG: u32 = 64;
pub const __FD_SETSIZE: u32 = 1024;
pub const VIDEO_TYPE_MDA: u32 = 16;
pub const VIDEO_TYPE_CGA: u32 = 17;
pub const VIDEO_TYPE_EGAM: u32 = 32;
pub const VIDEO_TYPE_EGAC: u32 = 33;
pub const VIDEO_TYPE_VGAC: u32 = 34;
pub const VIDEO_TYPE_VLFB: u32 = 35;
pub const VIDEO_TYPE_PICA_S3: u32 = 48;
pub const VIDEO_TYPE_MIPS_G364: u32 = 49;
pub const VIDEO_TYPE_SGI: u32 = 51;
pub const VIDEO_TYPE_TGAC: u32 = 64;
pub const VIDEO_TYPE_SUN: u32 = 80;
pub const VIDEO_TYPE_SUNPCI: u32 = 81;
pub const VIDEO_TYPE_PMAC: u32 = 96;
pub const VIDEO_TYPE_EFI: u32 = 112;
pub const VIDEO_FLAGS_NOCURSOR: u32 = 1;
pub const VIDEO_CAPABILITY_SKIP_QUIRKS: u32 = 1;
pub const VIDEO_CAPABILITY_64BIT_BASE: u32 = 2;
pub const APM_STATE_READY: u32 = 0;
pub const APM_STATE_STANDBY: u32 = 1;
pub const APM_STATE_SUSPEND: u32 = 2;
pub const APM_STATE_OFF: u32 = 3;
pub const APM_STATE_BUSY: u32 = 4;
pub const APM_STATE_REJECT: u32 = 5;
pub const APM_STATE_OEM_SYS: u32 = 32;
pub const APM_STATE_OEM_DEV: u32 = 64;
pub const APM_STATE_DISABLE: u32 = 0;
pub const APM_STATE_ENABLE: u32 = 1;
pub const APM_STATE_DISENGAGE: u32 = 0;
pub const APM_STATE_ENGAGE: u32 = 1;
pub const APM_SYS_STANDBY: u32 = 1;
pub const APM_SYS_SUSPEND: u32 = 2;
pub const APM_NORMAL_RESUME: u32 = 3;
pub const APM_CRITICAL_RESUME: u32 = 4;
pub const APM_LOW_BATTERY: u32 = 5;
pub const APM_POWER_STATUS_CHANGE: u32 = 6;
pub const APM_UPDATE_TIME: u32 = 7;
pub const APM_CRITICAL_SUSPEND: u32 = 8;
pub const APM_USER_STANDBY: u32 = 9;
pub const APM_USER_SUSPEND: u32 = 10;
pub const APM_STANDBY_RESUME: u32 = 11;
pub const APM_CAPABILITY_CHANGE: u32 = 12;
pub const APM_USER_HIBERNATION: u32 = 13;
pub const APM_HIBERNATION_RESUME: u32 = 14;
pub const APM_SUCCESS: u32 = 0;
pub const APM_DISABLED: u32 = 1;
pub const APM_CONNECTED: u32 = 2;
pub const APM_NOT_CONNECTED: u32 = 3;
pub const APM_16_CONNECTED: u32 = 5;
pub const APM_16_UNSUPPORTED: u32 = 6;
pub const APM_32_CONNECTED: u32 = 7;
pub const APM_32_UNSUPPORTED: u32 = 8;
pub const APM_BAD_DEVICE: u32 = 9;
pub const APM_BAD_PARAM: u32 = 10;
pub const APM_NOT_ENGAGED: u32 = 11;
pub const APM_BAD_FUNCTION: u32 = 12;
pub const APM_RESUME_DISABLED: u32 = 13;
pub const APM_NO_ERROR: u32 = 83;
pub const APM_BAD_STATE: u32 = 96;
pub const APM_NO_EVENTS: u32 = 128;
pub const APM_NOT_PRESENT: u32 = 134;
pub const APM_DEVICE_BIOS: u32 = 0;
pub const APM_DEVICE_ALL: u32 = 1;
pub const APM_DEVICE_DISPLAY: u32 = 256;
pub const APM_DEVICE_STORAGE: u32 = 512;
pub const APM_DEVICE_PARALLEL: u32 = 768;
pub const APM_DEVICE_SERIAL: u32 = 1024;
pub const APM_DEVICE_NETWORK: u32 = 1280;
pub const APM_DEVICE_PCMCIA: u32 = 1536;
pub const APM_DEVICE_BATTERY: u32 = 32768;
pub const APM_DEVICE_OEM: u32 = 57344;
pub const APM_DEVICE_OLD_ALL: u32 = 65535;
pub const APM_DEVICE_CLASS: u32 = 255;
pub const APM_DEVICE_MASK: u32 = 65280;
pub const APM_MAX_BATTERIES: u32 = 2;
pub const APM_CAP_GLOBAL_STANDBY: u32 = 1;
pub const APM_CAP_GLOBAL_SUSPEND: u32 = 2;
pub const APM_CAP_RESUME_STANDBY_TIMER: u32 = 4;
pub const APM_CAP_RESUME_SUSPEND_TIMER: u32 = 8;
pub const APM_CAP_RESUME_STANDBY_RING: u32 = 16;
pub const APM_CAP_RESUME_SUSPEND_RING: u32 = 32;
pub const APM_CAP_RESUME_STANDBY_PCMCIA: u32 = 64;
pub const APM_CAP_RESUME_SUSPEND_PCMCIA: u32 = 128;
pub const _IOC_NRBITS: u32 = 8;
pub const _IOC_TYPEBITS: u32 = 8;
pub const _IOC_SIZEBITS: u32 = 14;
pub const _IOC_DIRBITS: u32 = 2;
pub const _IOC_NRMASK: u32 = 255;
pub const _IOC_TYPEMASK: u32 = 255;
pub const _IOC_SIZEMASK: u32 = 16383;
pub const _IOC_DIRMASK: u32 = 3;
pub const _IOC_NRSHIFT: u32 = 0;
pub const _IOC_TYPESHIFT: u32 = 8;
pub const _IOC_SIZESHIFT: u32 = 16;
pub const _IOC_DIRSHIFT: u32 = 30;
pub const _IOC_NONE: u32 = 0;
pub const _IOC_WRITE: u32 = 1;
pub const _IOC_READ: u32 = 2;
pub const IOC_IN: u32 = 1073741824;
pub const IOC_OUT: u32 = 2147483648;
pub const IOC_INOUT: u32 = 3221225472;
pub const IOCSIZE_MASK: u32 = 1073676288;
pub const IOCSIZE_SHIFT: u32 = 16;
pub const EDDNR: u32 = 489;
pub const EDDBUF: u32 = 3328;
pub const EDDMAXNR: u32 = 6;
pub const EDDEXTSIZE: u32 = 8;
pub const EDDPARMSIZE: u32 = 74;
pub const CHECKEXTENSIONSPRESENT: u32 = 65;
pub const GETDEVICEPARAMETERS: u32 = 72;
pub const LEGACYGETDEVICEPARAMETERS: u32 = 8;
pub const EDDMAGIC1: u32 = 21930;
pub const EDDMAGIC2: u32 = 43605;
pub const READ_SECTORS: u32 = 2;
pub const EDD_MBR_SIG_OFFSET: u32 = 440;
pub const EDD_MBR_SIG_BUF: u32 = 656;
pub const EDD_MBR_SIG_MAX: u32 = 16;
pub const EDD_MBR_SIG_NR_BUF: u32 = 490;
pub const EDD_EXT_FIXED_DISK_ACCESS: u32 = 1;
pub const EDD_EXT_DEVICE_LOCKING_AND_EJECTING: u32 = 2;
pub const EDD_EXT_ENHANCED_DISK_DRIVE_SUPPORT: u32 = 4;
pub const EDD_EXT_64BIT_EXTENSIONS: u32 = 8;
pub const EDD_INFO_DMA_BOUNDARY_ERROR_TRANSPARENT: u32 = 1;
pub const EDD_INFO_GEOMETRY_VALID: u32 = 2;
pub const EDD_INFO_REMOVABLE: u32 = 4;
pub const EDD_INFO_WRITE_VERIFY: u32 = 8;
pub const EDD_INFO_MEDIA_CHANGE_NOTIFICATION: u32 = 16;
pub const EDD_INFO_LOCKABLE: u32 = 32;
pub const EDD_INFO_NO_MEDIA_PRESENT: u32 = 64;
pub const EDD_INFO_USE_INT13_FN50: u32 = 128;
pub const E820_MAX_ENTRIES_ZEROPAGE: u32 = 128;
pub const JAILHOUSE_SETUP_REQUIRED_VERSION: u32 = 1;
pub const E820MAP: ::std::os::raw::c_uint = 720;
pub const E820MAX: ::std::os::raw::c_uint = 128;
pub const E820_X_MAX: ::std::os::raw::c_uint = 128;
pub const E820NR: ::std::os::raw::c_uint = 488;
pub const E820_RAM: ::std::os::raw::c_uint = 1;
pub const E820_RESERVED: ::std::os::raw::c_uint = 2;
pub const E820_ACPI: ::std::os::raw::c_uint = 3;
pub const E820_NVS: ::std::os::raw::c_uint = 4;
pub const E820_UNUSABLE: ::std::os::raw::c_uint = 5;
pub const E820_RESERVED_KERN: ::std::os::raw::c_uint = 128;
pub type __s8 = ::std::os::raw::c_schar;
pub type __u8 = ::std::os::raw::c_uchar;
pub type __s16 = ::std::os::raw::c_short;
pub type __u16 = ::std::os::raw::c_ushort;
pub type __s32 = ::std::os::raw::c_int;
pub type __u32 = ::std::os::raw::c_uint;
pub type __s64 = ::std::os::raw::c_longlong;
pub type __u64 = ::std::os::raw::c_ulonglong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_fd_set {
pub fds_bits: [::std::os::raw::c_ulong; 16usize],
}
#[test]
fn bindgen_test_layout___kernel_fd_set() {
assert_eq!(
::std::mem::size_of::<__kernel_fd_set>(),
128usize,
concat!("Size of: ", stringify!(__kernel_fd_set))
);
assert_eq!(
::std::mem::align_of::<__kernel_fd_set>(),
8usize,
concat!("Alignment of ", stringify!(__kernel_fd_set))
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<__kernel_fd_set>())).fds_bits) as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__kernel_fd_set),
"::",
stringify!(fds_bits)
)
);
}
pub type __kernel_sighandler_t =
::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>;
pub type __kernel_key_t = ::std::os::raw::c_int;
pub type __kernel_mqd_t = ::std::os::raw::c_int;
pub type __kernel_old_uid_t = ::std::os::raw::c_ushort;
pub type __kernel_old_gid_t = ::std::os::raw::c_ushort;
pub type __kernel_old_dev_t = ::std::os::raw::c_ulong;
pub type __kernel_long_t = ::std::os::raw::c_long;
pub type __kernel_ulong_t = ::std::os::raw::c_ulong;
pub type __kernel_ino_t = __kernel_ulong_t;
pub type __kernel_mode_t = ::std::os::raw::c_uint;
pub type __kernel_pid_t = ::std::os::raw::c_int;
pub type __kernel_ipc_pid_t = ::std::os::raw::c_int;
pub type __kernel_uid_t = ::std::os::raw::c_uint;
pub type __kernel_gid_t = ::std::os::raw::c_uint;
pub type __kernel_suseconds_t = __kernel_long_t;
pub type __kernel_daddr_t = ::std::os::raw::c_int;
pub type __kernel_uid32_t = ::std::os::raw::c_uint;
pub type __kernel_gid32_t = ::std::os::raw::c_uint;
pub type __kernel_size_t = __kernel_ulong_t;
pub type __kernel_ssize_t = __kernel_long_t;
pub type __kernel_ptrdiff_t = __kernel_long_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_fsid_t {
pub val: [::std::os::raw::c_int; 2usize],
}
#[test]
fn bindgen_test_layout___kernel_fsid_t() {
assert_eq!(
::std::mem::size_of::<__kernel_fsid_t>(),
8usize,
concat!("Size of: ", stringify!(__kernel_fsid_t))
);
assert_eq!(
::std::mem::align_of::<__kernel_fsid_t>(),
4usize,
concat!("Alignment of ", stringify!(__kernel_fsid_t))
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<__kernel_fsid_t>())).val) as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__kernel_fsid_t),
"::",
stringify!(val)
)
);
}
pub type __kernel_off_t = __kernel_long_t;
pub type __kernel_loff_t = ::std::os::raw::c_longlong;
pub type __kernel_old_time_t = __kernel_long_t;
pub type __kernel_time_t = __kernel_long_t;
pub type __kernel_time64_t = ::std::os::raw::c_longlong;
pub type __kernel_clock_t = __kernel_long_t;
pub type __kernel_timer_t = ::std::os::raw::c_int;
pub type __kernel_clockid_t = ::std::os::raw::c_int;
pub type __kernel_caddr_t = *mut ::std::os::raw::c_char;
pub type __kernel_uid16_t = ::std::os::raw::c_ushort;
pub type __kernel_gid16_t = ::std::os::raw::c_ushort;
pub type __le16 = __u16;
pub type __be16 = __u16;
pub type __le32 = __u32;
pub type __be32 = __u32;
pub type __le64 = __u64;
pub type __be64 = __u64;
pub type __sum16 = __u16;
pub type __wsum = __u32;
pub type __poll_t = ::std::os::raw::c_uint;
#[repr(C, packed)]
#[derive(Debug, Copy, Clone, Default)]
pub struct screen_info {
pub orig_x: __u8,
pub orig_y: __u8,
pub ext_mem_k: __u16,
pub orig_video_page: __u16,
pub orig_video_mode: __u8,
pub orig_video_cols: __u8,
pub flags: __u8,
pub unused2: __u8,
pub orig_video_ega_bx: __u16,
pub unused3: __u16,
pub orig_video_lines: __u8,
pub orig_video_isVGA: __u8,
pub orig_video_points: __u16,
pub lfb_width: __u16,
pub lfb_height: __u16,
pub lfb_depth: __u16,
pub lfb_base: __u32,
pub lfb_size: __u32,
pub cl_magic: __u16,
pub cl_offset: __u16,
pub lfb_linelength: __u16,
pub red_size: __u8,
pub red_pos: __u8,
pub green_size: __u8,
pub green_pos: __u8,
pub blue_size: __u8,
pub blue_pos: __u8,
pub rsvd_size: __u8,
pub rsvd_pos: __u8,
pub vesapm_seg: __u16,
pub vesapm_off: __u16,
pub pages: __u16,
pub vesa_attributes: __u16,
pub capabilities: __u32,
pub ext_lfb_base: __u32,
pub _reserved: [__u8; 2usize],
}
#[test]
fn bindgen_test_layout_screen_info() {
assert_eq!(
::std::mem::size_of::<screen_info>(),
64usize,
concat!("Size of: ", stringify!(screen_info))
);
assert_eq!(
::std::mem::align_of::<screen_info>(),
1usize,
concat!("Alignment of ", stringify!(screen_info))
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).orig_x) as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(orig_x)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).orig_y) as *const _ as usize
},
1usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(orig_y)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).ext_mem_k) as *const _
as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(ext_mem_k)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).orig_video_page) as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(orig_video_page)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).orig_video_mode) as *const _
as usize
},
6usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(orig_video_mode)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).orig_video_cols) as *const _
as usize
},
7usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(orig_video_cols)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).flags) as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).unused2) as *const _ as usize
},
9usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(unused2)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).orig_video_ega_bx) as *const _
as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(orig_video_ega_bx)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).unused3) as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(unused3)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).orig_video_lines) as *const _
as usize
},
14usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(orig_video_lines)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).orig_video_isVGA) as *const _
as usize
},
15usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(orig_video_isVGA)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).orig_video_points) as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(orig_video_points)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).lfb_width) as *const _
as usize
},
18usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(lfb_width)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).lfb_height) as *const _
as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(lfb_height)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).lfb_depth) as *const _
as usize
},
22usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(lfb_depth)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).lfb_base) as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(lfb_base)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).lfb_size) as *const _ as usize
},
28usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(lfb_size)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).cl_magic) as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(cl_magic)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).cl_offset) as *const _
as usize
},
34usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(cl_offset)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).lfb_linelength) as *const _
as usize
},
36usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(lfb_linelength)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).red_size) as *const _ as usize
},
38usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(red_size)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).red_pos) as *const _ as usize
},
39usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(red_pos)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).green_size) as *const _
as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(green_size)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).green_pos) as *const _
as usize
},
41usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(green_pos)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).blue_size) as *const _
as usize
},
42usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(blue_size)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).blue_pos) as *const _ as usize
},
43usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(blue_pos)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).rsvd_size) as *const _
as usize
},
44usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(rsvd_size)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).rsvd_pos) as *const _ as usize
},
45usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(rsvd_pos)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).vesapm_seg) as *const _
as usize
},
46usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(vesapm_seg)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).vesapm_off) as *const _
as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(vesapm_off)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).pages) as *const _ as usize
},
50usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(pages)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).vesa_attributes) as *const _
as usize
},
52usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(vesa_attributes)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).capabilities) as *const _
as usize
},
54usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(capabilities)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>())).ext_lfb_base) as *const _
as usize
},
58usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(ext_lfb_base)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<screen_info>()))._reserved) as *const _
as usize
},
62usize,
concat!(
"Offset of field: ",
stringify!(screen_info),
"::",
stringify!(_reserved)
)
);
}
pub type apm_event_t = ::std::os::raw::c_ushort;
pub type apm_eventinfo_t = ::std::os::raw::c_ushort;
#[repr(C)]
#[derive(Debug, Copy, Clone, Default)]
pub struct apm_bios_info {
pub version: __u16,
pub cseg: __u16,
pub offset: __u32,
pub cseg_16: __u16,
pub dseg: __u16,
pub flags: __u16,
pub cseg_len: __u16,
pub cseg_16_len: __u16,
pub dseg_len: __u16,
}
#[test]
fn bindgen_test_layout_apm_bios_info() {
assert_eq!(
::std::mem::size_of::<apm_bios_info>(),
20usize,
concat!("Size of: ", stringify!(apm_bios_info))
);
assert_eq!(
::std::mem::align_of::<apm_bios_info>(),
4usize,
concat!("Alignment of ", stringify!(apm_bios_info))
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<apm_bios_info>())).version) as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(apm_bios_info),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<apm_bios_info>())).cseg) as *const _ as usize
},
2usize,
concat!(
"Offset of field: ",
stringify!(apm_bios_info),
"::",
stringify!(cseg)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<apm_bios_info>())).offset) as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(apm_bios_info),
"::",
stringify!(offset)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<apm_bios_info>())).cseg_16) as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(apm_bios_info),
"::",
stringify!(cseg_16)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<apm_bios_info>())).dseg) as *const _ as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(apm_bios_info),
"::",
stringify!(dseg)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<apm_bios_info>())).flags) as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(apm_bios_info),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<apm_bios_info>())).cseg_len) as *const _
as usize
},
14usize,
concat!(
"Offset of field: ",
stringify!(apm_bios_info),
"::",
stringify!(cseg_len)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<apm_bios_info>())).cseg_16_len) as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(apm_bios_info),
"::",
stringify!(cseg_16_len)
)
);
assert_eq!(
unsafe {
std::ptr::addr_of!((*(::std::ptr::null::<apm_bios_info>())).dseg_len) as *const _
as usize
},
18usize,
concat!(
"Offset of field: ",
stringify!(apm_bios_info),
"::",
stringify!(dseg_len)
)
);
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct edd_device_params {
pub length: __u16,
pub info_flags: __u16,
pub num_default_cylinders: __u32,
pub num_default_heads: __u32,
pub sectors_per_track: __u32,
pub number_of_sectors: __u64,
pub bytes_per_sector: __u16,
pub dpte_ptr: __u32,
pub key: __u16,
pub device_path_info_length: __u8,
pub reserved2: __u8,
pub reserved3: __u16,
pub host_bus_type: [__u8; 4usize],
pub interface_type: [__u8; 8usize],
pub interface_path: edd_device_params__bindgen_ty_1,
pub device_path: edd_device_params__bindgen_ty_2,
pub reserved4: __u8,