Lines Matching +full:linux +full:- +full:musl
1 //! Get filesystem statistics, non-portably
14 #[cfg(target_os = "linux")]
29 (fd: libc::c_int, buf: *mut type_of_statfs) -> libc::c_int
32 (path: *const libc::c_char, buf: *mut type_of_statfs) -> libc::c_int
37 (fd: libc::c_int, buf: *mut type_of_statfs) -> libc::c_int
40 (path: *const libc::c_char, buf: *mut type_of_statfs) -> libc::c_int
54 #[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))]
56 #[cfg(all(target_os = "linux", target_env = "musl"))]
58 #[cfg(all(target_os = "linux", target_env = "ohos"))]
60 #[cfg(all(target_os = "linux", target_env = "uclibc"))]
63 target_os = "linux",
66 target_env = "musl",
77 all(target_os = "linux", target_arch = "s390x"),
78 all(target_os = "linux", target_env = "musl"),
79 all(target_os = "linux", target_env = "ohos"),
81 target_os = "linux",
82 not(any(target_arch = "s390x", target_env = "musl"))
88 // These constants are defined without documentation in the Linux headers, so we
286 #[cfg(all(linux_android, not(target_env = "musl"), not(target_env = "ohos")))]
297 pub fn filesystem_type(&self) -> FsType { in filesystem_type()
303 pub fn filesystem_type_name(&self) -> &str { in filesystem_type_name()
310 pub fn optimal_transfer_size(&self) -> i32 { in optimal_transfer_size()
316 pub fn optimal_transfer_size(&self) -> u32 { in optimal_transfer_size()
321 #[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))]
322 pub fn optimal_transfer_size(&self) -> u32 { in optimal_transfer_size()
329 all(target_os = "linux", target_env = "musl"),
330 all(target_os = "linux", target_env = "ohos")
332 pub fn optimal_transfer_size(&self) -> libc::c_ulong { in optimal_transfer_size()
338 target_os = "linux",
341 target_env = "musl",
346 pub fn optimal_transfer_size(&self) -> libc::__fsword_t { in optimal_transfer_size()
351 #[cfg(all(target_os = "linux", target_env = "uclibc"))]
352 pub fn optimal_transfer_size(&self) -> libc::c_int { in optimal_transfer_size()
358 pub fn optimal_transfer_size(&self) -> libc::c_long { in optimal_transfer_size()
364 pub fn optimal_transfer_size(&self) -> u64 { in optimal_transfer_size()
370 pub fn block_size(&self) -> u32 { in block_size()
375 // f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
376 #[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))]
377 pub fn block_size(&self) -> u32 { in block_size()
382 // f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
383 #[cfg(all(target_os = "linux", target_env = "musl"))]
384 pub fn block_size(&self) -> libc::c_ulong { in block_size()
389 // f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
390 #[cfg(all(target_os = "linux", target_env = "ohos"))]
391 pub fn block_size(&self) -> libc::c_ulong { in block_size()
396 // f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
397 #[cfg(all(target_os = "linux", target_env = "uclibc"))]
398 pub fn block_size(&self) -> libc::c_int { in block_size()
403 // f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
405 target_os = "linux",
408 target_env = "musl",
413 pub fn block_size(&self) -> libc::__fsword_t { in block_size()
419 pub fn block_size(&self) -> u64 { in block_size()
425 pub fn block_size(&self) -> libc::c_ulong { in block_size()
431 pub fn block_size(&self) -> libc::c_long { in block_size()
438 pub fn flags(&self) -> MntFlags { in flags()
445 #[cfg(target_os = "linux")]
446 pub fn flags(&self) -> FsFlags { in flags()
452 pub fn maximum_name_length(&self) -> u32 { in maximum_name_length()
457 #[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))]
458 pub fn maximum_name_length(&self) -> u32 { in maximum_name_length()
463 #[cfg(all(target_os = "linux", target_env = "musl"))]
464 pub fn maximum_name_length(&self) -> libc::c_ulong { in maximum_name_length()
469 #[cfg(all(target_os = "linux", target_env = "uclibc"))]
470 pub fn maximum_name_length(&self) -> libc::c_int { in maximum_name_length()
476 target_os = "linux",
479 target_env = "musl",
484 pub fn maximum_name_length(&self) -> libc::__fsword_t { in maximum_name_length()
490 pub fn maximum_name_length(&self) -> libc::c_ulong { in maximum_name_length()
502 pub fn blocks(&self) -> u64 { in blocks()
508 pub fn blocks(&self) -> libc::c_long { in blocks()
514 pub fn blocks(&self) -> u32 { in blocks()
526 pub fn blocks_free(&self) -> u64 { in blocks_free()
532 pub fn blocks_free(&self) -> libc::c_long { in blocks_free()
538 pub fn blocks_free(&self) -> u32 { in blocks_free()
544 pub fn blocks_available(&self) -> u64 { in blocks_available()
550 pub fn blocks_available(&self) -> libc::c_long { in blocks_available()
556 pub fn blocks_available(&self) -> i64 { in blocks_available()
562 pub fn blocks_available(&self) -> u32 { in blocks_available()
574 pub fn files(&self) -> u64 { in files()
580 pub fn files(&self) -> libc::c_long { in files()
586 pub fn files(&self) -> u32 { in files()
597 pub fn files_free(&self) -> u64 { in files_free()
603 pub fn files_free(&self) -> libc::c_long { in files_free()
609 pub fn files_free(&self) -> i64 { in files_free()
615 pub fn files_free(&self) -> u32 { in files_free()
620 pub fn filesystem_id(&self) -> fsid_t { in filesystem_id()
626 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { in fmt()
644 /// The result is OS-dependent. For a portable alternative, see
649 /// `path` - Path to any file within the file system to describe
650 pub fn statfs<P: ?Sized + NixPath>(path: &P) -> Result<Statfs> { in statfs()
662 /// The result is OS-dependent. For a portable alternative, see
667 /// `fd` - File descriptor of any open file within the file system to describe
668 pub fn fstatfs<Fd: AsFd>(fd: Fd) -> Result<Statfs> { in fstatfs()