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();
}
......
Markdown is supported
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