Skip to main content

set_features

Function set_features 

Source
pub fn set_features(
    fd: BorrowedFd<'_>,
    flags: &FeatureFlags,
    mask: &FeatureFlags,
) -> Result<()>
Expand description

Set or clear feature flags on the filesystem.

The flags argument specifies the desired values, and mask specifies which bits to change. Only bits set in mask are modified: they are set to the corresponding value in flags. Bits not in the mask are left unchanged.

Use get_supported_features first to check which flags can be safely set or cleared at runtime.

Requires CAP_SYS_ADMIN. Returns EPERM without it.