dysk_cli/normal.rs
1use lfs_core::Mount;
2
3/// Determine whether the mounted filesystem is "normal", which
4/// means it should be listed in standard
5pub fn is_normal(m: &Mount) -> bool {
6 (
7 m.stats().is_some()
8 || m.is_unreachable()
9 )
10 && (
11 m.disk.is_some() // by default only fs with disks are shown
12 || m.info.fs_type == "zfs" // unless it's zfs - see https://github.com/Canop/dysk/issues/32
13 || m.info.is_remote()
14 )
15 && !m.info.bound // removing bound mounts
16 && m.info.fs_type != "squashfs" // quite ad-hoc...
17}