From 8d680662a27405a9b911811ab034383c93811df6 Mon Sep 17 00:00:00 2001 From: Ryan Zoeller Date: Fri, 14 Jan 2022 08:04:52 -0600 Subject: [PATCH] Define UMOUNT_NOFOLLOW, FUSE_SUPER_MAGIC Requested-by: jiangliu --- Cargo.toml | 2 +- src/mount/linux.rs | 1 + src/sys/statfs.rs | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 6550db11c3..dbe05683dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ targets = [ ] [dependencies] -libc = { version = "0.2.112", features = [ "extra_traits" ] } +libc = { git = "https://github.com/rust-lang/libc", rev = "e470e3b6a1f940e0024d40d3b79fc73fe29c7f17", features = [ "extra_traits" ] } bitflags = "1.1" cfg-if = "1.0" diff --git a/src/mount/linux.rs b/src/mount/linux.rs index 4cb2fa5490..4c976dcb5a 100644 --- a/src/mount/linux.rs +++ b/src/mount/linux.rs @@ -53,6 +53,7 @@ libc_bitflags!( MNT_FORCE; MNT_DETACH; MNT_EXPIRE; + UMOUNT_NOFOLLOW; } ); diff --git a/src/sys/statfs.rs b/src/sys/statfs.rs index 622734753a..e46733e703 100644 --- a/src/sys/statfs.rs +++ b/src/sys/statfs.rs @@ -73,6 +73,9 @@ pub const EXT3_SUPER_MAGIC: FsType = FsType(libc::EXT3_SUPER_MAGIC as fs_type_t) pub const EXT4_SUPER_MAGIC: FsType = FsType(libc::EXT4_SUPER_MAGIC as fs_type_t); #[cfg(all(target_os = "linux", not(target_env = "musl")))] #[allow(missing_docs)] +pub const FUSE_SUPER_MAGIC: FsType = FsType(libc::FUSE_SUPER_MAGIC as fs_type_t); +#[cfg(all(target_os = "linux", not(target_env = "musl")))] +#[allow(missing_docs)] pub const HPFS_SUPER_MAGIC: FsType = FsType(libc::HPFS_SUPER_MAGIC as fs_type_t); #[cfg(all(target_os = "linux", not(target_env = "musl")))] #[allow(missing_docs)]