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)]
77 #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
78 pub struct Mode: RawMode {
79 const RWXU = linux_raw_sys::general::S_IRWXU;
81
82 const RUSR = linux_raw_sys::general::S_IRUSR;
84
85 const WUSR = linux_raw_sys::general::S_IWUSR;
87
88 const XUSR = linux_raw_sys::general::S_IXUSR;
90
91 const RWXG = linux_raw_sys::general::S_IRWXG;
93
94 const RGRP = linux_raw_sys::general::S_IRGRP;
96
97 const WGRP = linux_raw_sys::general::S_IWGRP;
99
100 const XGRP = linux_raw_sys::general::S_IXGRP;
102
103 const RWXO = linux_raw_sys::general::S_IRWXO;
105
106 const ROTH = linux_raw_sys::general::S_IROTH;
108
109 const WOTH = linux_raw_sys::general::S_IWOTH;
111
112 const XOTH = linux_raw_sys::general::S_IXOTH;
114
115 const SUID = linux_raw_sys::general::S_ISUID;
117
118 const SGID = linux_raw_sys::general::S_ISGID;
120
121 const SVTX = linux_raw_sys::general::S_ISVTX;
123
124 const _ = !0;
126 }
127}
128
129impl Mode {
130 #[inline]
133 pub const fn from_raw_mode(st_mode: RawMode) -> Self {
134 Self::from_bits_truncate(st_mode & !linux_raw_sys::general::S_IFMT)
135 }
136
137 #[inline]
139 pub const fn as_raw_mode(self) -> RawMode {
140 self.bits()
141 }
142}
143
144impl From<RawMode> for Mode {
145 #[inline]
152 fn from(st_mode: RawMode) -> Self {
153 Self::from_raw_mode(st_mode)
154 }
155}
156
157impl From<Mode> for RawMode {
158 #[inline]
165 fn from(mode: Mode) -> Self {
166 mode.as_raw_mode()
167 }
168}
169
170bitflags! {
171 #[repr(transparent)]
175 #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
176 pub struct OFlags: ffi::c_uint {
177 const ACCMODE = linux_raw_sys::general::O_ACCMODE;
179
180 const RWMODE = linux_raw_sys::general::O_RDONLY |
188 linux_raw_sys::general::O_WRONLY |
189 linux_raw_sys::general::O_RDWR;
190
191 const APPEND = linux_raw_sys::general::O_APPEND;
193
194 #[doc(alias = "CREAT")]
196 const CREATE = linux_raw_sys::general::O_CREAT;
197
198 const DIRECTORY = linux_raw_sys::general::O_DIRECTORY;
200
201 const DSYNC = linux_raw_sys::general::O_SYNC;
203
204 const EXCL = linux_raw_sys::general::O_EXCL;
206
207 const FSYNC = linux_raw_sys::general::O_SYNC;
209
210 const NOFOLLOW = linux_raw_sys::general::O_NOFOLLOW;
212
213 const NONBLOCK = linux_raw_sys::general::O_NONBLOCK;
215
216 const RDONLY = linux_raw_sys::general::O_RDONLY;
218
219 const WRONLY = linux_raw_sys::general::O_WRONLY;
221
222 const RDWR = linux_raw_sys::general::O_RDWR;
226
227 const NOCTTY = linux_raw_sys::general::O_NOCTTY;
229
230 const RSYNC = linux_raw_sys::general::O_SYNC;
232
233 const SYNC = linux_raw_sys::general::O_SYNC;
235
236 const TRUNC = linux_raw_sys::general::O_TRUNC;
238
239 const PATH = linux_raw_sys::general::O_PATH;
241
242 const CLOEXEC = linux_raw_sys::general::O_CLOEXEC;
244
245 const TMPFILE = linux_raw_sys::general::O_TMPFILE;
247
248 const NOATIME = linux_raw_sys::general::O_NOATIME;
250
251 const DIRECT = linux_raw_sys::general::O_DIRECT;
253
254 const LARGEFILE = linux_raw_sys::general::O_LARGEFILE;
261
262 const ASYNC = linux_raw_sys::general::FASYNC;
267
268 const _ = !0;
270 }
271}
272
273bitflags! {
274 #[repr(transparent)]
278 #[derive(Default, Copy, Clone, Eq, PartialEq, Hash, Debug)]
279 pub struct ResolveFlags: u64 {
280 const NO_XDEV = linux_raw_sys::general::RESOLVE_NO_XDEV as u64;
282
283 const NO_MAGICLINKS = linux_raw_sys::general::RESOLVE_NO_MAGICLINKS as u64;
285
286 const NO_SYMLINKS = linux_raw_sys::general::RESOLVE_NO_SYMLINKS as u64;
288
289 const BENEATH = linux_raw_sys::general::RESOLVE_BENEATH as u64;
291
292 const IN_ROOT = linux_raw_sys::general::RESOLVE_IN_ROOT as u64;
294
295 const CACHED = linux_raw_sys::general::RESOLVE_CACHED as u64;
297
298 const _ = !0;
300 }
301}
302
303bitflags! {
304 #[repr(transparent)]
308 #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
309 pub struct RenameFlags: ffi::c_uint {
310 const EXCHANGE = linux_raw_sys::general::RENAME_EXCHANGE;
312
313 const NOREPLACE = linux_raw_sys::general::RENAME_NOREPLACE;
315
316 const WHITEOUT = linux_raw_sys::general::RENAME_WHITEOUT;
318
319 const _ = !0;
321 }
322}
323
324#[derive(Clone, Copy, Debug, PartialEq, Eq)]
329pub enum FileType {
330 RegularFile = linux_raw_sys::general::S_IFREG as isize,
332
333 Directory = linux_raw_sys::general::S_IFDIR as isize,
335
336 Symlink = linux_raw_sys::general::S_IFLNK as isize,
338
339 #[doc(alias = "IFO")]
341 Fifo = linux_raw_sys::general::S_IFIFO as isize,
342
343 Socket = linux_raw_sys::general::S_IFSOCK as isize,
345
346 CharacterDevice = linux_raw_sys::general::S_IFCHR as isize,
348
349 BlockDevice = linux_raw_sys::general::S_IFBLK as isize,
351
352 Unknown,
354}
355
356impl FileType {
357 #[inline]
360 pub const fn from_raw_mode(st_mode: RawMode) -> Self {
361 match st_mode & linux_raw_sys::general::S_IFMT {
362 linux_raw_sys::general::S_IFREG => Self::RegularFile,
363 linux_raw_sys::general::S_IFDIR => Self::Directory,
364 linux_raw_sys::general::S_IFLNK => Self::Symlink,
365 linux_raw_sys::general::S_IFIFO => Self::Fifo,
366 linux_raw_sys::general::S_IFSOCK => Self::Socket,
367 linux_raw_sys::general::S_IFCHR => Self::CharacterDevice,
368 linux_raw_sys::general::S_IFBLK => Self::BlockDevice,
369 _ => Self::Unknown,
370 }
371 }
372
373 #[inline]
375 pub const fn as_raw_mode(self) -> RawMode {
376 match self {
377 Self::RegularFile => linux_raw_sys::general::S_IFREG,
378 Self::Directory => linux_raw_sys::general::S_IFDIR,
379 Self::Symlink => linux_raw_sys::general::S_IFLNK,
380 Self::Fifo => linux_raw_sys::general::S_IFIFO,
381 Self::Socket => linux_raw_sys::general::S_IFSOCK,
382 Self::CharacterDevice => linux_raw_sys::general::S_IFCHR,
383 Self::BlockDevice => linux_raw_sys::general::S_IFBLK,
384 Self::Unknown => linux_raw_sys::general::S_IFMT,
385 }
386 }
387
388 #[inline]
390 pub(crate) const fn from_dirent_d_type(d_type: u8) -> Self {
391 match d_type as u32 {
392 linux_raw_sys::general::DT_REG => Self::RegularFile,
393 linux_raw_sys::general::DT_DIR => Self::Directory,
394 linux_raw_sys::general::DT_LNK => Self::Symlink,
395 linux_raw_sys::general::DT_SOCK => Self::Socket,
396 linux_raw_sys::general::DT_FIFO => Self::Fifo,
397 linux_raw_sys::general::DT_CHR => Self::CharacterDevice,
398 linux_raw_sys::general::DT_BLK => Self::BlockDevice,
399 _ => Self::Unknown,
401 }
402 }
403}
404
405#[derive(Debug, Copy, Clone, Eq, PartialEq)]
409#[repr(u32)]
410pub enum Advice {
411 Normal = linux_raw_sys::general::POSIX_FADV_NORMAL,
413
414 Sequential = linux_raw_sys::general::POSIX_FADV_SEQUENTIAL,
416
417 Random = linux_raw_sys::general::POSIX_FADV_RANDOM,
419
420 NoReuse = linux_raw_sys::general::POSIX_FADV_NOREUSE,
422
423 WillNeed = linux_raw_sys::general::POSIX_FADV_WILLNEED,
425
426 DontNeed = linux_raw_sys::general::POSIX_FADV_DONTNEED,
428}
429
430bitflags! {
431 #[repr(transparent)]
435 #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
436 pub struct MemfdFlags: ffi::c_uint {
437 const CLOEXEC = linux_raw_sys::general::MFD_CLOEXEC;
439
440 const ALLOW_SEALING = linux_raw_sys::general::MFD_ALLOW_SEALING;
442
443 const HUGETLB = linux_raw_sys::general::MFD_HUGETLB;
445
446 const NOEXEC_SEAL = linux_raw_sys::general::MFD_NOEXEC_SEAL;
448 const EXEC = linux_raw_sys::general::MFD_EXEC;
450
451 const HUGE_64KB = linux_raw_sys::general::MFD_HUGE_64KB;
453 const HUGE_512KB = linux_raw_sys::general::MFD_HUGE_512KB;
455 const HUGE_1MB = linux_raw_sys::general::MFD_HUGE_1MB;
457 const HUGE_2MB = linux_raw_sys::general::MFD_HUGE_2MB;
459 const HUGE_8MB = linux_raw_sys::general::MFD_HUGE_8MB;
461 const HUGE_16MB = linux_raw_sys::general::MFD_HUGE_16MB;
463 const HUGE_32MB = linux_raw_sys::general::MFD_HUGE_32MB;
465 const HUGE_256MB = linux_raw_sys::general::MFD_HUGE_256MB;
467 const HUGE_512MB = linux_raw_sys::general::MFD_HUGE_512MB;
469 const HUGE_1GB = linux_raw_sys::general::MFD_HUGE_1GB;
471 const HUGE_2GB = linux_raw_sys::general::MFD_HUGE_2GB;
473 const HUGE_16GB = linux_raw_sys::general::MFD_HUGE_16GB;
475
476 const _ = !0;
478 }
479}
480
481bitflags! {
482 #[repr(transparent)]
488 #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
489 pub struct SealFlags: u32 {
490 const SEAL = linux_raw_sys::general::F_SEAL_SEAL;
492 const SHRINK = linux_raw_sys::general::F_SEAL_SHRINK;
494 const GROW = linux_raw_sys::general::F_SEAL_GROW;
496 const WRITE = linux_raw_sys::general::F_SEAL_WRITE;
498 const FUTURE_WRITE = linux_raw_sys::general::F_SEAL_FUTURE_WRITE;
500 const EXEC = linux_raw_sys::general::F_SEAL_EXEC;
502
503 const _ = !0;
505 }
506}
507
508bitflags! {
509 #[repr(transparent)]
513 #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
514 pub struct FallocateFlags: u32 {
515 const KEEP_SIZE = linux_raw_sys::general::FALLOC_FL_KEEP_SIZE;
517 const PUNCH_HOLE = linux_raw_sys::general::FALLOC_FL_PUNCH_HOLE;
519 const NO_HIDE_STALE = linux_raw_sys::general::FALLOC_FL_NO_HIDE_STALE;
521 const COLLAPSE_RANGE = linux_raw_sys::general::FALLOC_FL_COLLAPSE_RANGE;
523 const ZERO_RANGE = linux_raw_sys::general::FALLOC_FL_ZERO_RANGE;
525 const INSERT_RANGE = linux_raw_sys::general::FALLOC_FL_INSERT_RANGE;
527 const UNSHARE_RANGE = linux_raw_sys::general::FALLOC_FL_UNSHARE_RANGE;
529
530 const _ = !0;
532 }
533}
534
535bitflags! {
536 #[repr(transparent)]
538 #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
539 pub struct StatVfsMountFlags: u64 {
540 const MANDLOCK = linux_raw_sys::general::MS_MANDLOCK as u64;
542
543 const NOATIME = linux_raw_sys::general::MS_NOATIME as u64;
545
546 const NODEV = linux_raw_sys::general::MS_NODEV as u64;
548
549 const NODIRATIME = linux_raw_sys::general::MS_NODIRATIME as u64;
551
552 const NOEXEC = linux_raw_sys::general::MS_NOEXEC as u64;
554
555 const NOSUID = linux_raw_sys::general::MS_NOSUID as u64;
557
558 const RDONLY = linux_raw_sys::general::MS_RDONLY as u64;
560
561 const RELATIME = linux_raw_sys::general::MS_RELATIME as u64;
563
564 const SYNCHRONOUS = linux_raw_sys::general::MS_SYNCHRONOUS as u64;
566
567 const _ = !0;
569 }
570}
571
572#[derive(Clone, Copy, Debug, PartialEq, Eq)]
577#[repr(u32)]
578pub enum FlockOperation {
579 LockShared = linux_raw_sys::general::LOCK_SH,
581 LockExclusive = linux_raw_sys::general::LOCK_EX,
583 Unlock = linux_raw_sys::general::LOCK_UN,
585 NonBlockingLockShared = linux_raw_sys::general::LOCK_SH | linux_raw_sys::general::LOCK_NB,
587 NonBlockingLockExclusive = linux_raw_sys::general::LOCK_EX | linux_raw_sys::general::LOCK_NB,
589 NonBlockingUnlock = linux_raw_sys::general::LOCK_UN | linux_raw_sys::general::LOCK_NB,
591}
592
593#[cfg(any(
601 target_pointer_width = "32",
602 target_arch = "mips64",
603 target_arch = "mips64r6"
604))]
605#[derive(Debug, Copy, Clone)]
606#[allow(missing_docs)]
607#[non_exhaustive]
608pub struct Stat {
609 pub st_dev: u64,
610 pub st_mode: u32,
611 pub st_nlink: u32,
612 pub st_uid: u32,
613 pub st_gid: u32,
614 pub st_rdev: u64,
615 pub st_size: i64,
616 pub st_blksize: u32,
617 pub st_blocks: u64,
618 pub st_atime: i64,
619 pub st_atime_nsec: u32,
620 pub st_mtime: i64,
621 pub st_mtime_nsec: u32,
622 pub st_ctime: i64,
623 pub st_ctime_nsec: u32,
624 pub st_ino: u64,
625}
626
627#[repr(C)]
632#[derive(Debug, Copy, Clone)]
633#[allow(missing_docs)]
634#[non_exhaustive]
635#[cfg(target_arch = "x86_64")]
636pub struct Stat {
637 pub st_dev: ffi::c_ulong,
638 pub st_ino: ffi::c_ulong,
639 pub st_nlink: ffi::c_ulong,
640 pub st_mode: ffi::c_uint,
641 pub st_uid: ffi::c_uint,
642 pub st_gid: ffi::c_uint,
643 pub(crate) __pad0: ffi::c_uint,
644 pub st_rdev: ffi::c_ulong,
645 pub st_size: ffi::c_long,
646 pub st_blksize: ffi::c_long,
647 pub st_blocks: ffi::c_long,
648 pub st_atime: ffi::c_long,
649 pub st_atime_nsec: ffi::c_ulong,
650 pub st_mtime: ffi::c_long,
651 pub st_mtime_nsec: ffi::c_ulong,
652 pub st_ctime: ffi::c_long,
653 pub st_ctime_nsec: ffi::c_ulong,
654 pub(crate) __unused: [ffi::c_long; 3],
655}
656#[repr(C)]
657#[derive(Debug, Copy, Clone)]
658#[allow(missing_docs)]
659#[non_exhaustive]
660#[cfg(target_arch = "aarch64")]
661pub struct Stat {
662 pub st_dev: ffi::c_ulong,
663 pub st_ino: ffi::c_ulong,
664 pub st_mode: ffi::c_uint,
665 pub st_nlink: ffi::c_uint,
666 pub st_uid: ffi::c_uint,
667 pub st_gid: ffi::c_uint,
668 pub st_rdev: ffi::c_ulong,
669 pub(crate) __pad1: ffi::c_ulong,
670 pub st_size: ffi::c_long,
671 pub st_blksize: ffi::c_int,
672 pub(crate) __pad2: ffi::c_int,
673 pub st_blocks: ffi::c_long,
674 pub st_atime: ffi::c_long,
675 pub st_atime_nsec: ffi::c_ulong,
676 pub st_mtime: ffi::c_long,
677 pub st_mtime_nsec: ffi::c_ulong,
678 pub st_ctime: ffi::c_long,
679 pub st_ctime_nsec: ffi::c_ulong,
680 pub(crate) __unused4: ffi::c_uint,
681 pub(crate) __unused5: ffi::c_uint,
682}
683#[repr(C)]
684#[derive(Debug, Copy, Clone)]
685#[allow(missing_docs)]
686#[non_exhaustive]
687#[cfg(target_arch = "riscv64")]
688pub struct Stat {
689 pub st_dev: ffi::c_ulong,
690 pub st_ino: ffi::c_ulong,
691 pub st_mode: ffi::c_uint,
692 pub st_nlink: ffi::c_uint,
693 pub st_uid: ffi::c_uint,
694 pub st_gid: ffi::c_uint,
695 pub st_rdev: ffi::c_ulong,
696 pub(crate) __pad1: ffi::c_ulong,
697 pub st_size: ffi::c_long,
698 pub st_blksize: ffi::c_int,
699 pub(crate) __pad2: ffi::c_int,
700 pub st_blocks: ffi::c_long,
701 pub st_atime: ffi::c_long,
702 pub st_atime_nsec: ffi::c_ulong,
703 pub st_mtime: ffi::c_long,
704 pub st_mtime_nsec: ffi::c_ulong,
705 pub st_ctime: ffi::c_long,
706 pub st_ctime_nsec: ffi::c_ulong,
707 pub(crate) __unused4: ffi::c_uint,
708 pub(crate) __unused5: ffi::c_uint,
709}
710#[repr(C)]
712#[derive(Debug, Copy, Clone)]
713#[allow(missing_docs)]
714#[non_exhaustive]
715#[cfg(target_arch = "powerpc64")]
716pub struct Stat {
717 pub st_dev: ffi::c_ulong,
718 pub st_ino: ffi::c_ulong,
719 pub st_nlink: ffi::c_ulong,
720 pub st_mode: ffi::c_uint,
721 pub st_uid: ffi::c_uint,
722 pub st_gid: ffi::c_uint,
723 pub st_rdev: ffi::c_ulong,
724 pub st_size: ffi::c_long,
725 pub st_blksize: ffi::c_ulong,
726 pub st_blocks: ffi::c_ulong,
727 pub st_atime: ffi::c_long,
728 pub st_atime_nsec: ffi::c_ulong,
729 pub st_mtime: ffi::c_long,
730 pub st_mtime_nsec: ffi::c_ulong,
731 pub st_ctime: ffi::c_long,
732 pub st_ctime_nsec: ffi::c_ulong,
733 pub(crate) __unused4: ffi::c_ulong,
734 pub(crate) __unused5: ffi::c_ulong,
735 pub(crate) __unused6: ffi::c_ulong,
736}
737#[repr(C)]
738#[derive(Debug, Copy, Clone)]
739#[allow(missing_docs)]
740#[non_exhaustive]
741#[cfg(target_arch = "s390x")]
742pub struct Stat {
743 pub st_dev: ffi::c_ulong,
744 pub st_ino: ffi::c_ulong,
745 pub st_nlink: ffi::c_ulong,
746 pub st_mode: ffi::c_uint,
747 pub st_uid: ffi::c_uint,
748 pub st_gid: ffi::c_uint,
749 pub(crate) __pad1: ffi::c_uint,
750 pub st_rdev: ffi::c_ulong,
751 pub st_size: ffi::c_long, pub st_atime: ffi::c_long,
753 pub st_atime_nsec: ffi::c_ulong,
754 pub st_mtime: ffi::c_long,
755 pub st_mtime_nsec: ffi::c_ulong,
756 pub st_ctime: ffi::c_long,
757 pub st_ctime_nsec: ffi::c_ulong,
758 pub st_blksize: ffi::c_ulong,
759 pub st_blocks: ffi::c_long,
760 pub(crate) __unused: [ffi::c_ulong; 3],
761}
762
763#[allow(clippy::module_name_repetitions)]
768#[repr(C)]
769#[cfg_attr(target_arch = "arm", repr(packed(4)))]
770#[derive(Debug, Copy, Clone)]
771#[allow(missing_docs)]
772#[non_exhaustive]
773pub struct StatFs {
774 pub f_type: FsWord,
775 #[cfg(not(any(target_arch = "arm", target_arch = "s390x")))]
776 pub f_bsize: ffi::c_long,
777 #[cfg(any(target_arch = "arm", target_arch = "s390x"))]
778 pub f_bsize: ffi::c_uint,
779 pub f_blocks: u64,
780 pub f_bfree: u64,
781 pub f_bavail: u64,
782 pub f_files: u64,
783 pub f_ffree: u64,
784 pub f_fsid: Fsid,
785 #[cfg(not(any(target_arch = "arm", target_arch = "s390x")))]
786 pub f_namelen: ffi::c_long,
787 #[cfg(any(target_arch = "arm", target_arch = "s390x"))]
788 pub f_namelen: ffi::c_uint,
789 #[cfg(not(any(target_arch = "arm", target_arch = "s390x")))]
790 pub f_frsize: ffi::c_long,
791 #[cfg(any(target_arch = "arm", target_arch = "s390x"))]
792 pub f_frsize: ffi::c_uint,
793 #[cfg(not(any(target_arch = "arm", target_arch = "s390x")))]
794 pub f_flags: ffi::c_long,
795 #[cfg(any(target_arch = "arm", target_arch = "s390x"))]
796 pub f_flags: ffi::c_uint,
797 #[cfg(not(target_arch = "s390x"))]
798 pub(crate) f_spare: [ffi::c_long; 4],
799 #[cfg(target_arch = "s390x")]
800 pub(crate) f_spare: [ffi::c_uint; 5],
801}
802
803#[repr(C)]
805#[derive(Debug, Copy, Clone)]
806#[allow(missing_docs)]
807pub struct Fsid {
808 pub(crate) val: [ffi::c_int; 2],
809}
810
811#[allow(missing_docs)]
816pub struct StatVfs {
817 pub f_bsize: u64,
818 pub f_frsize: u64,
819 pub f_blocks: u64,
820 pub f_bfree: u64,
821 pub f_bavail: u64,
822 pub f_files: u64,
823 pub f_ffree: u64,
824 pub f_favail: u64,
825 pub f_fsid: u64,
826 pub f_flag: StatVfsMountFlags,
827 pub f_namemax: u64,
828}
829
830pub type RawMode = ffi::c_uint;
832
833pub type Dev = u64;
836
837#[cfg(not(any(
839 target_arch = "mips64",
840 target_arch = "mips64r6",
841 target_arch = "s390x"
842)))]
843pub type FsWord = ffi::c_long;
844
845#[cfg(any(target_arch = "mips64", target_arch = "mips64r6"))]
847pub type FsWord = i64;
848
849#[cfg(target_arch = "s390x")]
851pub type FsWord = u32;