Verified Commit 1f1f0cd0 authored by Hatim Kanchwala's avatar Hatim Kanchwala
Browse files

Automatically load required kernel modules

parent 9747c6ea
......@@ -78,8 +78,8 @@ VfioContainer::VfioContainer()
};
for(const char* module : requiredKernelModules) {
if(kernel_module_loaded(module) != 0) {
logger->error("Kernel module '{}' required but not loaded. "
if(kernel_module_load(module) != 0) {
logger->error("Kernel module '{}' required but could not be loaded. "
"Please load manually!", module);
throw std::exception();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment