pub fn is_dir_backing_device_ro(dir: &Dir) -> Result<Option<bool>>Expand description
Determine whether the block device backing the filesystem mounted at the given directory is physically read-only.
This is the case for e.g. a live ISO, where /sysroot is a loopback device
over an immutable rootfs image and the kernel will reject any attempt to
remount it read-write.
Returns Ok(None) when the backing device cannot be determined (for example
when the filesystem source is not a real block device, such as an overlay),
leaving the decision to the caller.