-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathgeneral.rs
More file actions
3245 lines (3244 loc) · 103 KB
/
general.rs
File metadata and controls
3245 lines (3244 loc) · 103 KB
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
/* automatically generated by rust-bindgen 0.72.1 */
pub type __s8 = crate::ctypes::c_schar;
pub type __u8 = crate::ctypes::c_uchar;
pub type __s16 = crate::ctypes::c_short;
pub type __u16 = crate::ctypes::c_ushort;
pub type __s32 = crate::ctypes::c_int;
pub type __u32 = crate::ctypes::c_uint;
pub type __s64 = crate::ctypes::c_longlong;
pub type __u64 = crate::ctypes::c_ulonglong;
pub type __kernel_sighandler_t = ::core::option::Option<unsafe extern "C" fn(arg1: crate::ctypes::c_int)>;
pub type __kernel_key_t = crate::ctypes::c_int;
pub type __kernel_mqd_t = crate::ctypes::c_int;
pub type __kernel_old_uid_t = crate::ctypes::c_ushort;
pub type __kernel_old_gid_t = crate::ctypes::c_ushort;
pub type __kernel_long_t = crate::ctypes::c_long;
pub type __kernel_ulong_t = crate::ctypes::c_ulong;
pub type __kernel_ino_t = __kernel_ulong_t;
pub type __kernel_mode_t = crate::ctypes::c_uint;
pub type __kernel_pid_t = crate::ctypes::c_int;
pub type __kernel_ipc_pid_t = crate::ctypes::c_int;
pub type __kernel_uid_t = crate::ctypes::c_uint;
pub type __kernel_gid_t = crate::ctypes::c_uint;
pub type __kernel_suseconds_t = __kernel_long_t;
pub type __kernel_daddr_t = crate::ctypes::c_int;
pub type __kernel_uid32_t = crate::ctypes::c_uint;
pub type __kernel_gid32_t = crate::ctypes::c_uint;
pub type __kernel_old_dev_t = crate::ctypes::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;
pub type __kernel_off_t = __kernel_long_t;
pub type __kernel_loff_t = crate::ctypes::c_longlong;
pub type __kernel_uoff_t = crate::ctypes::c_ulonglong;
pub type __kernel_old_time_t = __kernel_long_t;
pub type __kernel_time_t = __kernel_long_t;
pub type __kernel_time64_t = crate::ctypes::c_longlong;
pub type __kernel_clock_t = __kernel_long_t;
pub type __kernel_timer_t = crate::ctypes::c_int;
pub type __kernel_clockid_t = crate::ctypes::c_int;
pub type __kernel_caddr_t = *mut crate::ctypes::c_char;
pub type __kernel_uid16_t = crate::ctypes::c_ushort;
pub type __kernel_gid16_t = crate::ctypes::c_ushort;
pub type __s128 = i128;
pub type __u128 = u128;
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 = crate::ctypes::c_uint;
pub type cap_user_header_t = *mut __user_cap_header_struct;
pub type cap_user_data_t = *mut __user_cap_data_struct;
pub type __kernel_rwf_t = crate::ctypes::c_int;
pub type old_sigset_t = crate::ctypes::c_ulong;
pub type __signalfn_t = ::core::option::Option<unsafe extern "C" fn(arg1: crate::ctypes::c_int)>;
pub type __sighandler_t = __signalfn_t;
pub type __restorefn_t = ::core::option::Option<unsafe extern "C" fn()>;
pub type __sigrestore_t = __restorefn_t;
pub type stack_t = sigaltstack;
pub type sigval_t = sigval;
pub type siginfo_t = siginfo;
pub type sigevent_t = sigevent;
pub type cc_t = crate::ctypes::c_uchar;
pub type speed_t = crate::ctypes::c_uint;
pub type tcflag_t = crate::ctypes::c_uint;
pub type __fsword_t = __kernel_long_t;
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
storage: Storage,
}
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::core::marker::PhantomData<T>, [T; 0]);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_fd_set {
pub fds_bits: [crate::ctypes::c_ulong; 16usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_fsid_t {
pub val: [crate::ctypes::c_int; 2usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __user_cap_header_struct {
pub version: __u32,
pub pid: crate::ctypes::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __user_cap_data_struct {
pub effective: __u32,
pub permitted: __u32,
pub inheritable: __u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct vfs_cap_data {
pub magic_etc: __le32,
pub data: [vfs_cap_data__bindgen_ty_1; 2usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct vfs_cap_data__bindgen_ty_1 {
pub permitted: __le32,
pub inheritable: __le32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct vfs_ns_cap_data {
pub magic_etc: __le32,
pub data: [vfs_ns_cap_data__bindgen_ty_1; 2usize],
pub rootid: __le32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct vfs_ns_cap_data__bindgen_ty_1 {
pub permitted: __le32,
pub inheritable: __le32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct f_owner_ex {
pub type_: crate::ctypes::c_int,
pub pid: __kernel_pid_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct flock {
pub l_type: crate::ctypes::c_short,
pub l_whence: crate::ctypes::c_short,
pub l_start: __kernel_off_t,
pub l_len: __kernel_off_t,
pub l_pid: __kernel_pid_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct flock64 {
pub l_type: crate::ctypes::c_short,
pub l_whence: crate::ctypes::c_short,
pub l_start: __kernel_loff_t,
pub l_len: __kernel_loff_t,
pub l_pid: __kernel_pid_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct open_how {
pub flags: __u64,
pub mode: __u64,
pub resolve: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct delegation {
pub d_flags: __u32,
pub d_type: __u16,
pub __pad: __u16,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct epoll_event {
pub events: __poll_t,
pub data: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct epoll_params {
pub busy_poll_usecs: __u32,
pub busy_poll_budget: __u16,
pub prefer_busy_poll: __u8,
pub __pad: __u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fscrypt_policy_v1 {
pub version: __u8,
pub contents_encryption_mode: __u8,
pub filenames_encryption_mode: __u8,
pub flags: __u8,
pub master_key_descriptor: [__u8; 8usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fscrypt_key {
pub mode: __u32,
pub raw: [__u8; 64usize],
pub size: __u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fscrypt_policy_v2 {
pub version: __u8,
pub contents_encryption_mode: __u8,
pub filenames_encryption_mode: __u8,
pub flags: __u8,
pub log2_data_unit_size: __u8,
pub __reserved: [__u8; 3usize],
pub master_key_identifier: [__u8; 16usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fscrypt_get_policy_ex_arg {
pub policy_size: __u64,
pub policy: fscrypt_get_policy_ex_arg__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fscrypt_key_specifier {
pub type_: __u32,
pub __reserved: __u32,
pub u: fscrypt_key_specifier__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug)]
pub struct fscrypt_provisioning_key_payload {
pub type_: __u32,
pub flags: __u32,
pub raw: __IncompleteArrayField<__u8>,
}
#[repr(C)]
pub struct fscrypt_add_key_arg {
pub key_spec: fscrypt_key_specifier,
pub raw_size: __u32,
pub key_id: __u32,
pub flags: __u32,
pub __reserved: [__u32; 7usize],
pub raw: __IncompleteArrayField<__u8>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fscrypt_remove_key_arg {
pub key_spec: fscrypt_key_specifier,
pub removal_status_flags: __u32,
pub __reserved: [__u32; 5usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct fscrypt_get_key_status_arg {
pub key_spec: fscrypt_key_specifier,
pub __reserved: [__u32; 6usize],
pub status: __u32,
pub status_flags: __u32,
pub user_count: __u32,
pub __out_reserved: [__u32; 13usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mount_attr {
pub attr_set: __u64,
pub attr_clr: __u64,
pub propagation: __u64,
pub userns_fd: __u64,
}
#[repr(C)]
#[derive(Debug)]
pub struct statmount {
pub size: __u32,
pub mnt_opts: __u32,
pub mask: __u64,
pub sb_dev_major: __u32,
pub sb_dev_minor: __u32,
pub sb_magic: __u64,
pub sb_flags: __u32,
pub fs_type: __u32,
pub mnt_id: __u64,
pub mnt_parent_id: __u64,
pub mnt_id_old: __u32,
pub mnt_parent_id_old: __u32,
pub mnt_attr: __u64,
pub mnt_propagation: __u64,
pub mnt_peer_group: __u64,
pub mnt_master: __u64,
pub propagate_from: __u64,
pub mnt_root: __u32,
pub mnt_point: __u32,
pub mnt_ns_id: __u64,
pub fs_subtype: __u32,
pub sb_source: __u32,
pub opt_num: __u32,
pub opt_array: __u32,
pub opt_sec_num: __u32,
pub opt_sec_array: __u32,
pub supported_mask: __u64,
pub mnt_uidmap_num: __u32,
pub mnt_uidmap: __u32,
pub mnt_gidmap_num: __u32,
pub mnt_gidmap: __u32,
pub __spare2: [__u64; 43usize],
pub str_: __IncompleteArrayField<crate::ctypes::c_char>,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct mnt_id_req {
pub size: __u32,
pub mnt_ns_fd: __u32,
pub mnt_id: __u64,
pub param: __u64,
pub mnt_ns_id: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct file_clone_range {
pub src_fd: __s64,
pub src_offset: __u64,
pub src_length: __u64,
pub dest_offset: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fstrim_range {
pub start: __u64,
pub len: __u64,
pub minlen: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fsuuid2 {
pub len: __u8,
pub uuid: [__u8; 16usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fs_sysfs_path {
pub len: __u8,
pub name: [__u8; 128usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct logical_block_metadata_cap {
pub lbmd_flags: __u32,
pub lbmd_interval: __u16,
pub lbmd_size: __u8,
pub lbmd_opaque_size: __u8,
pub lbmd_opaque_offset: __u8,
pub lbmd_pi_size: __u8,
pub lbmd_pi_offset: __u8,
pub lbmd_guard_tag_type: __u8,
pub lbmd_app_tag_size: __u8,
pub lbmd_ref_tag_size: __u8,
pub lbmd_storage_tag_size: __u8,
pub pad: __u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct file_dedupe_range_info {
pub dest_fd: __s64,
pub dest_offset: __u64,
pub bytes_deduped: __u64,
pub status: __s32,
pub reserved: __u32,
}
#[repr(C)]
#[derive(Debug)]
pub struct file_dedupe_range {
pub src_offset: __u64,
pub src_length: __u64,
pub dest_count: __u16,
pub reserved1: __u16,
pub reserved2: __u32,
pub info: __IncompleteArrayField<file_dedupe_range_info>,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct files_stat_struct {
pub nr_files: crate::ctypes::c_ulong,
pub nr_free_files: crate::ctypes::c_ulong,
pub max_files: crate::ctypes::c_ulong,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct inodes_stat_t {
pub nr_inodes: crate::ctypes::c_long,
pub nr_unused: crate::ctypes::c_long,
pub dummy: [crate::ctypes::c_long; 5usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fsxattr {
pub fsx_xflags: __u32,
pub fsx_extsize: __u32,
pub fsx_nextents: __u32,
pub fsx_projid: __u32,
pub fsx_cowextsize: __u32,
pub fsx_pad: [crate::ctypes::c_uchar; 8usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct file_attr {
pub fa_xflags: __u64,
pub fa_extsize: __u32,
pub fa_nextents: __u32,
pub fa_projid: __u32,
pub fa_cowextsize: __u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct page_region {
pub start: __u64,
pub end: __u64,
pub categories: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pm_scan_arg {
pub size: __u64,
pub flags: __u64,
pub start: __u64,
pub end: __u64,
pub walk_end: __u64,
pub vec: __u64,
pub vec_len: __u64,
pub max_pages: __u64,
pub category_inverted: __u64,
pub category_mask: __u64,
pub category_anyof_mask: __u64,
pub return_mask: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct procmap_query {
pub size: __u64,
pub query_flags: __u64,
pub query_addr: __u64,
pub vma_start: __u64,
pub vma_end: __u64,
pub vma_flags: __u64,
pub vma_page_size: __u64,
pub vma_offset: __u64,
pub inode: __u64,
pub dev_major: __u32,
pub dev_minor: __u32,
pub vma_name_size: __u32,
pub build_id_size: __u32,
pub vma_name_addr: __u64,
pub build_id_addr: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct futex_waitv {
pub val: __u64,
pub uaddr: __u64,
pub flags: __u32,
pub __reserved: __u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct robust_list {
pub next: *mut robust_list,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct robust_list_head {
pub list: robust_list,
pub futex_offset: crate::ctypes::c_long,
pub list_op_pending: *mut robust_list,
}
#[repr(C)]
#[derive(Debug)]
pub struct inotify_event {
pub wd: __s32,
pub mask: __u32,
pub cookie: __u32,
pub len: __u32,
pub name: __IncompleteArrayField<crate::ctypes::c_char>,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cachestat_range {
pub off: __u64,
pub len: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cachestat {
pub nr_cache: __u64,
pub nr_dirty: __u64,
pub nr_writeback: __u64,
pub nr_evicted: __u64,
pub nr_recently_evicted: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pollfd {
pub fd: crate::ctypes::c_int,
pub events: crate::ctypes::c_short,
pub revents: crate::ctypes::c_short,
}
#[repr(C)]
#[derive(Debug)]
pub struct rand_pool_info {
pub entropy_count: crate::ctypes::c_int,
pub buf_size: crate::ctypes::c_int,
pub buf: __IncompleteArrayField<__u32>,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct vgetrandom_opaque_params {
pub size_of_opaque_state: __u32,
pub mmap_prot: __u32,
pub mmap_flags: __u32,
pub reserved: [__u32; 13usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_timespec {
pub tv_sec: __kernel_time64_t,
pub tv_nsec: crate::ctypes::c_longlong,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_itimerspec {
pub it_interval: __kernel_timespec,
pub it_value: __kernel_timespec,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_old_timeval {
pub tv_sec: __kernel_long_t,
pub tv_usec: __kernel_long_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_old_timespec {
pub tv_sec: __kernel_old_time_t,
pub tv_nsec: crate::ctypes::c_long,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_old_itimerval {
pub it_interval: __kernel_old_timeval,
pub it_value: __kernel_old_timeval,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_sock_timeval {
pub tv_sec: __s64,
pub tv_usec: __s64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rusage {
pub ru_utime: __kernel_old_timeval,
pub ru_stime: __kernel_old_timeval,
pub ru_maxrss: __kernel_long_t,
pub ru_ixrss: __kernel_long_t,
pub ru_idrss: __kernel_long_t,
pub ru_isrss: __kernel_long_t,
pub ru_minflt: __kernel_long_t,
pub ru_majflt: __kernel_long_t,
pub ru_nswap: __kernel_long_t,
pub ru_inblock: __kernel_long_t,
pub ru_oublock: __kernel_long_t,
pub ru_msgsnd: __kernel_long_t,
pub ru_msgrcv: __kernel_long_t,
pub ru_nsignals: __kernel_long_t,
pub ru_nvcsw: __kernel_long_t,
pub ru_nivcsw: __kernel_long_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rlimit {
pub rlim_cur: __kernel_ulong_t,
pub rlim_max: __kernel_ulong_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rlimit64 {
pub rlim_cur: __u64,
pub rlim_max: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct clone_args {
pub flags: __u64,
pub pidfd: __u64,
pub child_tid: __u64,
pub parent_tid: __u64,
pub exit_signal: __u64,
pub stack: __u64,
pub stack_size: __u64,
pub tls: __u64,
pub set_tid: __u64,
pub set_tid_size: __u64,
pub cgroup: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sigset_t {
pub sig: [crate::ctypes::c_ulong; 1usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sigaction {
pub sa_handler: __sighandler_t,
pub sa_flags: crate::ctypes::c_ulong,
pub sa_restorer: __sigrestore_t,
pub sa_mask: sigset_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sigaltstack {
pub ss_sp: *mut crate::ctypes::c_void,
pub ss_flags: crate::ctypes::c_int,
pub ss_size: __kernel_size_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sifields__bindgen_ty_1 {
pub _pid: __kernel_pid_t,
pub _uid: __kernel_uid32_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __sifields__bindgen_ty_2 {
pub _tid: __kernel_timer_t,
pub _overrun: crate::ctypes::c_int,
pub _sigval: sigval_t,
pub _sys_private: crate::ctypes::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __sifields__bindgen_ty_3 {
pub _pid: __kernel_pid_t,
pub _uid: __kernel_uid32_t,
pub _sigval: sigval_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sifields__bindgen_ty_4 {
pub _pid: __kernel_pid_t,
pub _uid: __kernel_uid32_t,
pub _status: crate::ctypes::c_int,
pub _utime: __kernel_clock_t,
pub _stime: __kernel_clock_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __sifields__bindgen_ty_5 {
pub _addr: *mut crate::ctypes::c_void,
pub __bindgen_anon_1: __sifields__bindgen_ty_5__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 {
pub _dummy_bnd: [crate::ctypes::c_char; 8usize],
pub _lower: *mut crate::ctypes::c_void,
pub _upper: *mut crate::ctypes::c_void,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_2 {
pub _dummy_pkey: [crate::ctypes::c_char; 8usize],
pub _pkey: __u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sifields__bindgen_ty_5__bindgen_ty_1__bindgen_ty_3 {
pub _data: crate::ctypes::c_ulong,
pub _type: __u32,
pub _flags: __u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sifields__bindgen_ty_6 {
pub _band: crate::ctypes::c_long,
pub _fd: crate::ctypes::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sifields__bindgen_ty_7 {
pub _call_addr: *mut crate::ctypes::c_void,
pub _syscall: crate::ctypes::c_int,
pub _arch: crate::ctypes::c_uint,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct siginfo {
pub __bindgen_anon_1: siginfo__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct siginfo__bindgen_ty_1__bindgen_ty_1 {
pub si_signo: crate::ctypes::c_int,
pub si_errno: crate::ctypes::c_int,
pub si_code: crate::ctypes::c_int,
pub _sifields: __sifields,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct sigevent {
pub sigev_value: sigval_t,
pub sigev_signo: crate::ctypes::c_int,
pub sigev_notify: crate::ctypes::c_int,
pub _sigev_un: sigevent__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sigevent__bindgen_ty_1__bindgen_ty_1 {
pub _function: ::core::option::Option<unsafe extern "C" fn(arg1: sigval_t)>,
pub _attribute: *mut crate::ctypes::c_void,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct statx_timestamp {
pub tv_sec: __s64,
pub tv_nsec: __u32,
pub __reserved: __s32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct statx {
pub stx_mask: __u32,
pub stx_blksize: __u32,
pub stx_attributes: __u64,
pub stx_nlink: __u32,
pub stx_uid: __u32,
pub stx_gid: __u32,
pub stx_mode: __u16,
pub __spare0: [__u16; 1usize],
pub stx_ino: __u64,
pub stx_size: __u64,
pub stx_blocks: __u64,
pub stx_attributes_mask: __u64,
pub stx_atime: statx_timestamp,
pub stx_btime: statx_timestamp,
pub stx_ctime: statx_timestamp,
pub stx_mtime: statx_timestamp,
pub stx_rdev_major: __u32,
pub stx_rdev_minor: __u32,
pub stx_dev_major: __u32,
pub stx_dev_minor: __u32,
pub stx_mnt_id: __u64,
pub stx_dio_mem_align: __u32,
pub stx_dio_offset_align: __u32,
pub stx_subvol: __u64,
pub stx_atomic_write_unit_min: __u32,
pub stx_atomic_write_unit_max: __u32,
pub stx_atomic_write_segments_max: __u32,
pub stx_dio_read_offset_align: __u32,
pub stx_atomic_write_unit_max_opt: __u32,
pub __spare2: [__u32; 1usize],
pub __spare3: [__u64; 8usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct termios {
pub c_iflag: tcflag_t,
pub c_oflag: tcflag_t,
pub c_cflag: tcflag_t,
pub c_lflag: tcflag_t,
pub c_line: cc_t,
pub c_cc: [cc_t; 19usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct termios2 {
pub c_iflag: tcflag_t,
pub c_oflag: tcflag_t,
pub c_cflag: tcflag_t,
pub c_lflag: tcflag_t,
pub c_line: cc_t,
pub c_cc: [cc_t; 19usize],
pub c_ispeed: speed_t,
pub c_ospeed: speed_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ktermios {
pub c_iflag: tcflag_t,
pub c_oflag: tcflag_t,
pub c_cflag: tcflag_t,
pub c_lflag: tcflag_t,
pub c_line: cc_t,
pub c_cc: [cc_t; 19usize],
pub c_ispeed: speed_t,
pub c_ospeed: speed_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct winsize {
pub ws_row: crate::ctypes::c_ushort,
pub ws_col: crate::ctypes::c_ushort,
pub ws_xpixel: crate::ctypes::c_ushort,
pub ws_ypixel: crate::ctypes::c_ushort,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct termio {
pub c_iflag: crate::ctypes::c_ushort,
pub c_oflag: crate::ctypes::c_ushort,
pub c_cflag: crate::ctypes::c_ushort,
pub c_lflag: crate::ctypes::c_ushort,
pub c_line: crate::ctypes::c_uchar,
pub c_cc: [crate::ctypes::c_uchar; 8usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timespec {
pub tv_sec: __kernel_old_time_t,
pub tv_nsec: crate::ctypes::c_long,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timeval {
pub tv_sec: __kernel_old_time_t,
pub tv_usec: __kernel_suseconds_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct itimerspec {
pub it_interval: timespec,
pub it_value: timespec,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct itimerval {
pub it_interval: timeval,
pub it_value: timeval,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timezone {
pub tz_minuteswest: crate::ctypes::c_int,
pub tz_dsttime: crate::ctypes::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iovec {
pub iov_base: *mut crate::ctypes::c_void,
pub iov_len: __kernel_size_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct dmabuf_cmsg {
pub frag_offset: __u64,
pub frag_size: __u32,
pub frag_token: __u32,
pub dmabuf_id: __u32,
pub flags: __u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct dmabuf_token {
pub token_start: __u32,
pub token_count: __u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xattr_args {
pub value: __u64,
pub size: __u32,
pub flags: __u32,
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct uffd_msg {
pub event: __u8,
pub reserved1: __u8,
pub reserved2: __u16,
pub reserved3: __u32,
pub arg: uffd_msg__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct uffd_msg__bindgen_ty_1__bindgen_ty_1 {
pub flags: __u64,
pub address: __u64,
pub feat: uffd_msg__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffd_msg__bindgen_ty_1__bindgen_ty_2 {
pub ufd: __u32,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffd_msg__bindgen_ty_1__bindgen_ty_3 {
pub from: __u64,
pub to: __u64,
pub len: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffd_msg__bindgen_ty_1__bindgen_ty_4 {
pub start: __u64,
pub end: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffd_msg__bindgen_ty_1__bindgen_ty_5 {
pub reserved1: __u64,
pub reserved2: __u64,
pub reserved3: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffdio_api {
pub api: __u64,
pub features: __u64,
pub ioctls: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffdio_range {
pub start: __u64,
pub len: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffdio_register {
pub range: uffdio_range,
pub mode: __u64,
pub ioctls: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffdio_copy {
pub dst: __u64,
pub src: __u64,
pub len: __u64,
pub mode: __u64,
pub copy: __s64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffdio_zeropage {
pub range: uffdio_range,
pub mode: __u64,
pub zeropage: __s64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffdio_writeprotect {
pub range: uffdio_range,
pub mode: __u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffdio_continue {
pub range: uffdio_range,
pub mode: __u64,
pub mapped: __s64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffdio_poison {
pub range: uffdio_range,
pub mode: __u64,
pub updated: __s64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct uffdio_move {
pub dst: __u64,
pub src: __u64,
pub len: __u64,
pub mode: __u64,
pub move_: __s64,
}
#[repr(C)]
#[derive(Debug)]
pub struct linux_dirent64 {
pub d_ino: crate::ctypes::c_ulong,
pub d_off: crate::ctypes::c_long,
pub d_reclen: __u16,
pub d_type: __u8,
pub d_name: __IncompleteArrayField<crate::ctypes::c_char>,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct stat {
pub st_dev: crate::ctypes::c_ulong,
pub st_ino: crate::ctypes::c_ulong,
pub st_mode: crate::ctypes::c_uint,
pub st_nlink: crate::ctypes::c_uint,
pub st_uid: crate::ctypes::c_uint,
pub st_gid: crate::ctypes::c_uint,
pub st_rdev: crate::ctypes::c_ulong,
pub __pad1: crate::ctypes::c_ulong,
pub st_size: crate::ctypes::c_long,
pub st_blksize: crate::ctypes::c_int,
pub __pad2: crate::ctypes::c_int,
pub st_blocks: crate::ctypes::c_long,
pub st_atime: crate::ctypes::c_long,
pub st_atime_nsec: crate::ctypes::c_ulong,
pub st_mtime: crate::ctypes::c_long,
pub st_mtime_nsec: crate::ctypes::c_ulong,
pub st_ctime: crate::ctypes::c_long,
pub st_ctime_nsec: crate::ctypes::c_ulong,
pub __unused4: crate::ctypes::c_uint,
pub __unused5: crate::ctypes::c_uint,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]