Merge "toolbox/modprobe: Load modules from /lib/modules based on page size" into main

This commit is contained in:
Treehugger Robot 2024-06-12 14:56:06 +00:00 committed by Gerrit Code Review
commit 441f39230e

View file

@ -245,8 +245,10 @@ extern "C" int modprobe_main(int argc, char** argv) {
}
free(kernel_dirs);
// Allow modules to be directly inside /lib/modules
mod_dirs.emplace_back(LIB_MODULES_PREFIX);
if (mod_dirs.empty() || getpagesize() == 4096) {
// Allow modules to be directly inside /lib/modules
mod_dirs.emplace_back(LIB_MODULES_PREFIX);
}
}
LOG(DEBUG) << "mode is " << mode;