Skip to main content

have_udev

Function have_udev 

Source
pub(crate) fn have_udev() -> bool
Expand description

Check whether the udev database is accessible (cached for the process lifetime).

When running inside a container or sandbox without /run/udev bind-mounted, tools like lsblk that depend on the udev database will return null for fields like parttype and fstype.

We check for /run/udev/data (the actual database directory) rather than just /run/udev because the parent directory can exist as an empty mount point without the database being populated.