1use crate::ffi;
2use bitflags::bitflags;
3
4bitflags! {
5    #[repr(transparent)]
9    #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
10    pub struct Access: ffi::c_uint {
11        const READ_OK = linux_raw_sys::general::R_OK;
13
14        const WRITE_OK = linux_raw_sys::general::W_OK;
16
17        const EXEC_OK = linux_raw_sys::general::X_OK;
19
20        const EXISTS = linux_raw_sys::general::F_OK;
22
23        const _ = !0;
25    }
26}
27
28bitflags! {
29    #[repr(transparent)]
35    #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
36    pub struct AtFlags: ffi::c_uint {
37        const SYMLINK_NOFOLLOW = linux_raw_sys::general::AT_SYMLINK_NOFOLLOW;
39
40        const EACCESS = linux_raw_sys::general::AT_EACCESS;
42
43        const REMOVEDIR = linux_raw_sys::general::AT_REMOVEDIR;
45
46        const SYMLINK_FOLLOW = linux_raw_sys::general::AT_SYMLINK_FOLLOW;
48
49        const NO_AUTOMOUNT = linux_raw_sys::general::AT_NO_AUTOMOUNT;
51
52        const EMPTY_PATH = linux_raw_sys::general::AT_EMPTY_PATH;
54
55        const STATX_SYNC_AS_STAT = linux_raw_sys::general::AT_STATX_SYNC_AS_STAT;
57
58        const STATX_FORCE_SYNC = linux_raw_sys::general::AT_STATX_FORCE_SYNC;
60
61        const STATX_DONT_SYNC = linux_raw_sys::general::AT_STATX_DONT_SYNC;
63
64        const _ = !0;
66    }
67}
68
69bitflags! {
70    #[repr(transparent)]
76    #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
77    pub struct Mode: RawMode {
78        const RWXU = linux_raw_sys::general::S_IRWXU;
80
81        const RUSR = linux_raw_sys::general::S_IRUSR;
83
84        const WUSR = linux_raw_sys::general::S_IWUSR;
86
87        const XUSR = linux_raw_sys::general::S_IXUSR;
89
90        const RWXG = linux_raw_sys::general::S_IRWXG;
92
93        const RGRP = linux_raw_sys::general::S_IRGRP;
95
96        const WGRP = linux_raw_sys::general::S_IWGRP;
98
99        const XGRP = linux_raw_sys::general::S_IXGRP;
101
102        const RWXO = linux_raw_sys::general::S_IRWXO;
104
105        const ROTH = linux_raw_sys::general::S_IROTH;
107
108        const WOTH = linux_raw_sys::general::S_IWOTH;
110
111        const XOTH = linux_raw_sys::general::S_IXOTH;
113
114        const SUID = linux_raw_sys::general::S_ISUID;
116
117        const SGID = linux_raw_sys::general::S_ISGID;
119
120        const SVTX = linux_raw_sys::general::S_ISVTX;
122
123        const _ = !0;
125    }
126}
127
128impl Mode {
129    #[inline]
132    pub const fn from_raw_mode(st_mode: RawMode) -> Self {
133        Self::from_bits_truncate(st_mode & !linux_raw_sys::general::S_IFMT)
134    }
135
136    #[inline]
138    pub const fn as_raw_mode(self) -> RawMode {
139        self.bits()
140    }
141}
142
143impl From<RawMode> for Mode {
144    #[inline]
151    fn from(st_mode: RawMode) -> Self {
152        Self::from_raw_mode(st_mode)
153    }
154}
155
156impl From<Mode> for RawMode {
157    #[inline]
164    fn from(mode: Mode) -> Self {
165        mode.as_raw_mode()
166    }
167}
168
169bitflags! {
170    #[repr(transparent)]
174    #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
175    pub struct OFlags: ffi::c_uint {
176        const ACCMODE = linux_raw_sys::general::O_ACCMODE;
178
179        const RWMODE = linux_raw_sys::general::O_RDONLY |
187                       linux_raw_sys::general::O_WRONLY |
188                       linux_raw_sys::general::O_RDWR;
189
190        const APPEND = linux_raw_sys::general::O_APPEND;
192
193        #[doc(alias = "CREAT")]
195        const CREATE = linux_raw_sys::general::O_CREAT;
196
197        const DIRECTORY = linux_raw_sys::general::O_DIRECTORY;
199
200        const DSYNC = linux_raw_sys::general::O_SYNC;
202
203        const EXCL = linux_raw_sys::general::O_EXCL;
205
206        const FSYNC = linux_raw_sys::general::O_SYNC;
208
209        const NOFOLLOW = linux_raw_sys::general::O_NOFOLLOW;
211
212        const NONBLOCK = linux_raw_sys::general::O_NONBLOCK;
214
215        const RDONLY = linux_raw_sys::general::O_RDONLY;
217
218        const WRONLY = linux_raw_sys::general::O_WRONLY;
220
221        const RDWR = linux_raw_sys::general::O_RDWR;
225
226        const NOCTTY = linux_raw_sys::general::O_NOCTTY;
228
229        const RSYNC = linux_raw_sys::general::O_SYNC;
231
232        const SYNC = linux_raw_sys::general::O_SYNC;
234
235        const TRUNC = linux_raw_sys::general::O_TRUNC;
237
238        const PATH = linux_raw_sys::general::O_PATH;
240
241        const CLOEXEC = linux_raw_sys::general::O_CLOEXEC;
243
244        const TMPFILE = linux_raw_sys::general::O_TMPFILE;
246
247        const NOATIME = linux_raw_sys::general::O_NOATIME;
249
250        const DIRECT = linux_raw_sys::general::O_DIRECT;
252
253        const LARGEFILE = linux_raw_sys::general::O_LARGEFILE;
260
261        const ASYNC = linux_raw_sys::general::FASYNC;
266
267        const _ = !0;
269    }
270}
271
272bitflags! {
273    #[repr(transparent)]
277    #[derive(Default, Copy, Clone, Eq, PartialEq, Hash, Debug)]
278    pub struct ResolveFlags: u64 {
279        const NO_XDEV = linux_raw_sys::general::RESOLVE_NO_XDEV as u64;
281
282        const NO_MAGICLINKS = linux_raw_sys::general::RESOLVE_NO_MAGICLINKS as u64;
284
285        const NO_SYMLINKS = linux_raw_sys::general::RESOLVE_NO_SYMLINKS as u64;
287
288        const BENEATH = linux_raw_sys::general::RESOLVE_BENEATH as u64;
290
291        const IN_ROOT = linux_raw_sys::general::RESOLVE_IN_ROOT as u64;
293
294        const CACHED = linux_raw_sys::general::RESOLVE_CACHED as u64;
296
297        const _ = !0;
299    }
300}
301
302bitflags! {
303    #[repr(transparent)]
307    #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
308    pub struct RenameFlags: ffi::c_uint {
309        const EXCHANGE = linux_raw_sys::general::RENAME_EXCHANGE;
311
312        const NOREPLACE = linux_raw_sys::general::RENAME_NOREPLACE;
314
315        const WHITEOUT = linux_raw_sys::general::RENAME_WHITEOUT;
317
318        const _ = !0;
320    }
321}
322
323#[derive(Clone, Copy, Debug, PartialEq, Eq)]
328pub enum FileType {
329    RegularFile = linux_raw_sys::general::S_IFREG as isize,
331
332    Directory = linux_raw_sys::general::S_IFDIR as isize,
334
335    Symlink = linux_raw_sys::general::S_IFLNK as isize,
337
338    #[doc(alias = "IFO")]
340    Fifo = linux_raw_sys::general::S_IFIFO as isize,
341
342    Socket = linux_raw_sys::general::S_IFSOCK as isize,
344
345    CharacterDevice = linux_raw_sys::general::S_IFCHR as isize,
347
348    BlockDevice = linux_raw_sys::general::S_IFBLK as isize,
350
351    Unknown,
353}
354
355impl FileType {
356    #[inline]
359    pub const fn from_raw_mode(st_mode: RawMode) -> Self {
360        match st_mode & linux_raw_sys::general::S_IFMT {
361            linux_raw_sys::general::S_IFREG => Self::RegularFile,
362            linux_raw_sys::general::S_IFDIR => Self::Directory,
363            linux_raw_sys::general::S_IFLNK => Self::Symlink,
364            linux_raw_sys::general::S_IFIFO => Self::Fifo,
365            linux_raw_sys::general::S_IFSOCK => Self::Socket,
366            linux_raw_sys::general::S_IFCHR => Self::CharacterDevice,
367            linux_raw_sys::general::S_IFBLK => Self::BlockDevice,
368            _ => Self::Unknown,
369        }
370    }
371
372    #[inline]
374    pub const fn as_raw_mode(self) -> RawMode {
375        match self {
376            Self::RegularFile => linux_raw_sys::general::S_IFREG,
377            Self::Directory => linux_raw_sys::general::S_IFDIR,
378            Self::Symlink => linux_raw_sys::general::S_IFLNK,
379            Self::Fifo => linux_raw_sys::general::S_IFIFO,
380            Self::Socket => linux_raw_sys::general::S_IFSOCK,
381            Self::CharacterDevice => linux_raw_sys::general::S_IFCHR,
382            Self::BlockDevice => linux_raw_sys::general::S_IFBLK,
383            Self::Unknown => linux_raw_sys::general::S_IFMT,
384        }
385    }
386
387    #[inline]
389    pub(crate) const fn from_dirent_d_type(d_type: u8) -> Self {
390        match d_type as u32 {
391            linux_raw_sys::general::DT_REG => Self::RegularFile,
392            linux_raw_sys::general::DT_DIR => Self::Directory,
393            linux_raw_sys::general::DT_LNK => Self::Symlink,
394            linux_raw_sys::general::DT_SOCK => Self::Socket,
395            linux_raw_sys::general::DT_FIFO => Self::Fifo,
396            linux_raw_sys::general::DT_CHR => Self::CharacterDevice,
397            linux_raw_sys::general::DT_BLK => Self::BlockDevice,
398            _ => Self::Unknown,
400        }
401    }
402}
403
404#[derive(Debug, Copy, Clone, Eq, PartialEq)]
408#[repr(u32)]
409pub enum Advice {
410    Normal = linux_raw_sys::general::POSIX_FADV_NORMAL,
412
413    Sequential = linux_raw_sys::general::POSIX_FADV_SEQUENTIAL,
415
416    Random = linux_raw_sys::general::POSIX_FADV_RANDOM,
418
419    NoReuse = linux_raw_sys::general::POSIX_FADV_NOREUSE,
421
422    WillNeed = linux_raw_sys::general::POSIX_FADV_WILLNEED,
424
425    DontNeed = linux_raw_sys::general::POSIX_FADV_DONTNEED,
427}
428
429bitflags! {
430    #[repr(transparent)]
434    #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
435    pub struct MemfdFlags: ffi::c_uint {
436        const CLOEXEC = linux_raw_sys::general::MFD_CLOEXEC;
438
439        const ALLOW_SEALING = linux_raw_sys::general::MFD_ALLOW_SEALING;
441
442        const HUGETLB = linux_raw_sys::general::MFD_HUGETLB;
444
445        const NOEXEC_SEAL = linux_raw_sys::general::MFD_NOEXEC_SEAL;
447        const EXEC = linux_raw_sys::general::MFD_EXEC;
449
450        const HUGE_64KB = linux_raw_sys::general::MFD_HUGE_64KB;
452        const HUGE_512KB = linux_raw_sys::general::MFD_HUGE_512KB;
454        const HUGE_1MB = linux_raw_sys::general::MFD_HUGE_1MB;
456        const HUGE_2MB = linux_raw_sys::general::MFD_HUGE_2MB;
458        const HUGE_8MB = linux_raw_sys::general::MFD_HUGE_8MB;
460        const HUGE_16MB = linux_raw_sys::general::MFD_HUGE_16MB;
462        const HUGE_32MB = linux_raw_sys::general::MFD_HUGE_32MB;
464        const HUGE_256MB = linux_raw_sys::general::MFD_HUGE_256MB;
466        const HUGE_512MB = linux_raw_sys::general::MFD_HUGE_512MB;
468        const HUGE_1GB = linux_raw_sys::general::MFD_HUGE_1GB;
470        const HUGE_2GB = linux_raw_sys::general::MFD_HUGE_2GB;
472        const HUGE_16GB = linux_raw_sys::general::MFD_HUGE_16GB;
474
475        const _ = !0;
477    }
478}
479
480bitflags! {
481    #[repr(transparent)]
487    #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
488    pub struct SealFlags: u32 {
489        const SEAL = linux_raw_sys::general::F_SEAL_SEAL;
491        const SHRINK = linux_raw_sys::general::F_SEAL_SHRINK;
493        const GROW = linux_raw_sys::general::F_SEAL_GROW;
495        const WRITE = linux_raw_sys::general::F_SEAL_WRITE;
497        const FUTURE_WRITE = linux_raw_sys::general::F_SEAL_FUTURE_WRITE;
499        const EXEC = linux_raw_sys::general::F_SEAL_EXEC;
501
502        const _ = !0;
504    }
505}
506
507bitflags! {
508    #[repr(transparent)]
512    #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
513    pub struct FallocateFlags: u32 {
514        const KEEP_SIZE = linux_raw_sys::general::FALLOC_FL_KEEP_SIZE;
516        const PUNCH_HOLE = linux_raw_sys::general::FALLOC_FL_PUNCH_HOLE;
518        const NO_HIDE_STALE = linux_raw_sys::general::FALLOC_FL_NO_HIDE_STALE;
520        const COLLAPSE_RANGE = linux_raw_sys::general::FALLOC_FL_COLLAPSE_RANGE;
522        const ZERO_RANGE = linux_raw_sys::general::FALLOC_FL_ZERO_RANGE;
524        const INSERT_RANGE = linux_raw_sys::general::FALLOC_FL_INSERT_RANGE;
526        const UNSHARE_RANGE = linux_raw_sys::general::FALLOC_FL_UNSHARE_RANGE;
528
529        const _ = !0;
531    }
532}
533
534bitflags! {
535    #[repr(transparent)]
537    #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
538    pub struct StatVfsMountFlags: u64 {
539        const MANDLOCK = linux_raw_sys::general::MS_MANDLOCK as u64;
541
542        const NOATIME = linux_raw_sys::general::MS_NOATIME as u64;
544
545        const NODEV = linux_raw_sys::general::MS_NODEV as u64;
547
548        const NODIRATIME = linux_raw_sys::general::MS_NODIRATIME as u64;
550
551        const NOEXEC = linux_raw_sys::general::MS_NOEXEC as u64;
553
554        const NOSUID = linux_raw_sys::general::MS_NOSUID as u64;
556
557        const RDONLY = linux_raw_sys::general::MS_RDONLY as u64;
559
560        const RELATIME = linux_raw_sys::general::MS_RELATIME as u64;
562
563        const SYNCHRONOUS = linux_raw_sys::general::MS_SYNCHRONOUS as u64;
565
566        const _ = !0;
568    }
569}
570
571#[derive(Clone, Copy, Debug, PartialEq, Eq)]
576#[repr(u32)]
577pub enum FlockOperation {
578    LockShared = linux_raw_sys::general::LOCK_SH,
580    LockExclusive = linux_raw_sys::general::LOCK_EX,
582    Unlock = linux_raw_sys::general::LOCK_UN,
584    NonBlockingLockShared = linux_raw_sys::general::LOCK_SH | linux_raw_sys::general::LOCK_NB,
586    NonBlockingLockExclusive = linux_raw_sys::general::LOCK_EX | linux_raw_sys::general::LOCK_NB,
588    NonBlockingUnlock = linux_raw_sys::general::LOCK_UN | linux_raw_sys::general::LOCK_NB,
590}
591
592#[cfg(any(
600    target_pointer_width = "32",
601    target_arch = "mips64",
602    target_arch = "mips64r6"
603))]
604#[derive(Debug, Copy, Clone)]
605#[allow(missing_docs)]
606#[non_exhaustive]
607pub struct Stat {
608    pub st_dev: u64,
609    pub st_mode: u32,
610    pub st_nlink: u32,
611    pub st_uid: u32,
612    pub st_gid: u32,
613    pub st_rdev: u64,
614    pub st_size: i64,
615    pub st_blksize: u32,
616    pub st_blocks: u64,
617    pub st_atime: i64,
618    pub st_atime_nsec: u32,
619    pub st_mtime: i64,
620    pub st_mtime_nsec: u32,
621    pub st_ctime: i64,
622    pub st_ctime_nsec: u32,
623    pub st_ino: u64,
624}
625
626#[repr(C)]
631#[derive(Debug, Copy, Clone)]
632#[allow(missing_docs)]
633#[non_exhaustive]
634#[cfg(target_arch = "x86_64")]
635pub struct Stat {
636    pub st_dev: ffi::c_ulong,
637    pub st_ino: ffi::c_ulong,
638    pub st_nlink: ffi::c_ulong,
639    pub st_mode: ffi::c_uint,
640    pub st_uid: ffi::c_uint,
641    pub st_gid: ffi::c_uint,
642    pub(crate) __pad0: ffi::c_uint,
643    pub st_rdev: ffi::c_ulong,
644    pub st_size: ffi::c_long,
645    pub st_blksize: ffi::c_long,
646    pub st_blocks: ffi::c_long,
647    pub st_atime: ffi::c_long,
648    pub st_atime_nsec: ffi::c_ulong,
649    pub st_mtime: ffi::c_long,
650    pub st_mtime_nsec: ffi::c_ulong,
651    pub st_ctime: ffi::c_long,
652    pub st_ctime_nsec: ffi::c_ulong,
653    pub(crate) __unused: [ffi::c_long; 3],
654}
655#[repr(C)]
656#[derive(Debug, Copy, Clone)]
657#[allow(missing_docs)]
658#[non_exhaustive]
659#[cfg(target_arch = "aarch64")]
660pub struct Stat {
661    pub st_dev: ffi::c_ulong,
662    pub st_ino: ffi::c_ulong,
663    pub st_mode: ffi::c_uint,
664    pub st_nlink: ffi::c_uint,
665    pub st_uid: ffi::c_uint,
666    pub st_gid: ffi::c_uint,
667    pub st_rdev: ffi::c_ulong,
668    pub(crate) __pad1: ffi::c_ulong,
669    pub st_size: ffi::c_long,
670    pub st_blksize: ffi::c_int,
671    pub(crate) __pad2: ffi::c_int,
672    pub st_blocks: ffi::c_long,
673    pub st_atime: ffi::c_long,
674    pub st_atime_nsec: ffi::c_ulong,
675    pub st_mtime: ffi::c_long,
676    pub st_mtime_nsec: ffi::c_ulong,
677    pub st_ctime: ffi::c_long,
678    pub st_ctime_nsec: ffi::c_ulong,
679    pub(crate) __unused4: ffi::c_uint,
680    pub(crate) __unused5: ffi::c_uint,
681}
682#[repr(C)]
683#[derive(Debug, Copy, Clone)]
684#[allow(missing_docs)]
685#[non_exhaustive]
686#[cfg(target_arch = "riscv64")]
687pub struct Stat {
688    pub st_dev: ffi::c_ulong,
689    pub st_ino: ffi::c_ulong,
690    pub st_mode: ffi::c_uint,
691    pub st_nlink: ffi::c_uint,
692    pub st_uid: ffi::c_uint,
693    pub st_gid: ffi::c_uint,
694    pub st_rdev: ffi::c_ulong,
695    pub(crate) __pad1: ffi::c_ulong,
696    pub st_size: ffi::c_long,
697    pub st_blksize: ffi::c_int,
698    pub(crate) __pad2: ffi::c_int,
699    pub st_blocks: ffi::c_long,
700    pub st_atime: ffi::c_long,
701    pub st_atime_nsec: ffi::c_ulong,
702    pub st_mtime: ffi::c_long,
703    pub st_mtime_nsec: ffi::c_ulong,
704    pub st_ctime: ffi::c_long,
705    pub st_ctime_nsec: ffi::c_ulong,
706    pub(crate) __unused4: ffi::c_uint,
707    pub(crate) __unused5: ffi::c_uint,
708}
709#[repr(C)]
711#[derive(Debug, Copy, Clone)]
712#[allow(missing_docs)]
713#[non_exhaustive]
714#[cfg(target_arch = "powerpc64")]
715pub struct Stat {
716    pub st_dev: ffi::c_ulong,
717    pub st_ino: ffi::c_ulong,
718    pub st_nlink: ffi::c_ulong,
719    pub st_mode: ffi::c_uint,
720    pub st_uid: ffi::c_uint,
721    pub st_gid: ffi::c_uint,
722    pub st_rdev: ffi::c_ulong,
723    pub st_size: ffi::c_long,
724    pub st_blksize: ffi::c_ulong,
725    pub st_blocks: ffi::c_ulong,
726    pub st_atime: ffi::c_long,
727    pub st_atime_nsec: ffi::c_ulong,
728    pub st_mtime: ffi::c_long,
729    pub st_mtime_nsec: ffi::c_ulong,
730    pub st_ctime: ffi::c_long,
731    pub st_ctime_nsec: ffi::c_ulong,
732    pub(crate) __unused4: ffi::c_ulong,
733    pub(crate) __unused5: ffi::c_ulong,
734    pub(crate) __unused6: ffi::c_ulong,
735}
736#[repr(C)]
737#[derive(Debug, Copy, Clone)]
738#[allow(missing_docs)]
739#[non_exhaustive]
740#[cfg(target_arch = "s390x")]
741pub struct Stat {
742    pub st_dev: ffi::c_ulong,
743    pub st_ino: ffi::c_ulong,
744    pub st_nlink: ffi::c_ulong,
745    pub st_mode: ffi::c_uint,
746    pub st_uid: ffi::c_uint,
747    pub st_gid: ffi::c_uint,
748    pub(crate) __pad1: ffi::c_uint,
749    pub st_rdev: ffi::c_ulong,
750    pub st_size: ffi::c_long, pub st_atime: ffi::c_long,
752    pub st_atime_nsec: ffi::c_ulong,
753    pub st_mtime: ffi::c_long,
754    pub st_mtime_nsec: ffi::c_ulong,
755    pub st_ctime: ffi::c_long,
756    pub st_ctime_nsec: ffi::c_ulong,
757    pub st_blksize: ffi::c_ulong,
758    pub st_blocks: ffi::c_long,
759    pub(crate) __unused: [ffi::c_ulong; 3],
760}
761
762#[allow(clippy::module_name_repetitions)]
767#[repr(C)]
768#[cfg_attr(target_arch = "arm", repr(packed(4)))]
769#[derive(Debug, Copy, Clone)]
770#[allow(missing_docs)]
771#[non_exhaustive]
772pub struct StatFs {
773    pub f_type: FsWord,
774    #[cfg(not(any(target_arch = "arm", target_arch = "s390x")))]
775    pub f_bsize: ffi::c_long,
776    #[cfg(any(target_arch = "arm", target_arch = "s390x"))]
777    pub f_bsize: ffi::c_uint,
778    pub f_blocks: u64,
779    pub f_bfree: u64,
780    pub f_bavail: u64,
781    pub f_files: u64,
782    pub f_ffree: u64,
783    pub f_fsid: Fsid,
784    #[cfg(not(any(target_arch = "arm", target_arch = "s390x")))]
785    pub f_namelen: ffi::c_long,
786    #[cfg(any(target_arch = "arm", target_arch = "s390x"))]
787    pub f_namelen: ffi::c_uint,
788    #[cfg(not(any(target_arch = "arm", target_arch = "s390x")))]
789    pub f_frsize: ffi::c_long,
790    #[cfg(any(target_arch = "arm", target_arch = "s390x"))]
791    pub f_frsize: ffi::c_uint,
792    #[cfg(not(any(target_arch = "arm", target_arch = "s390x")))]
793    pub f_flags: ffi::c_long,
794    #[cfg(any(target_arch = "arm", target_arch = "s390x"))]
795    pub f_flags: ffi::c_uint,
796    #[cfg(not(target_arch = "s390x"))]
797    pub(crate) f_spare: [ffi::c_long; 4],
798    #[cfg(target_arch = "s390x")]
799    pub(crate) f_spare: [ffi::c_uint; 5],
800}
801
802#[repr(C)]
804#[derive(Debug, Copy, Clone)]
805#[allow(missing_docs)]
806pub struct Fsid {
807    pub(crate) val: [ffi::c_int; 2],
808}
809
810#[allow(missing_docs)]
815pub struct StatVfs {
816    pub f_bsize: u64,
817    pub f_frsize: u64,
818    pub f_blocks: u64,
819    pub f_bfree: u64,
820    pub f_bavail: u64,
821    pub f_files: u64,
822    pub f_ffree: u64,
823    pub f_favail: u64,
824    pub f_fsid: u64,
825    pub f_flag: StatVfsMountFlags,
826    pub f_namemax: u64,
827}
828
829pub type RawMode = ffi::c_uint;
831
832pub type Dev = u64;
835
836#[cfg(not(any(
838    target_arch = "mips64",
839    target_arch = "mips64r6",
840    target_arch = "s390x"
841)))]
842pub type FsWord = ffi::c_long;
843
844#[cfg(any(target_arch = "mips64", target_arch = "mips64r6"))]
846pub type FsWord = i64;
847
848#[cfg(target_arch = "s390x")]
850pub type FsWord = u32;