Version of uutils util-linux is master
Uutils version:
./target/release/util-linux mountpoint /etc
/etc is a mountpoint
Version of GNU util-linux is 2.40
GNU version:
mountpoint /etc
/etc is not a mountpoint
It seems to be getting confused on BTRFS? especially in the inode check since when I checked inode was 293 for /etc on my system
#[cfg(not(windows))]
fn is_mountpoint(path: &str) -> bool {
let metadata = match fs::metadata(path) {
Ok(metadata) => metadata,
Err(_) => return false,
};
let dev = metadata.dev();
let inode = metadata.ino();
// Root inode (typically 2 in most Unix filesystems) indicates a mount point
inode == 2
|| match fs::metadata("..") {
Ok(parent_metadata) => parent_metadata.dev() != dev,
Err(_) => false,
}
}