Function evdi::check_kernel_mod[][src]

pub fn check_kernel_mod() -> KernelModStatus

Check the status of the evdi kernel module for compatibility with this library version.

This is provided so that you can show a helpful error message early. [DeviceNode::open] will perform this check for you.

match check_kernel_mod() {
    KernelModStatus::NotInstalled => {
        println!("You need to install the evdi kernel module");
    }
    KernelModStatus::Outdated => {
        println!("Your version of the evdi kernel module is too outdated to use with this library version");
    }
    KernelModStatus::Compatible => {
        println!("You have a compatible version of the evdi kernel module installed");
    }
}