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

Original change: https://android-review.googlesource.com/c/platform/system/core/+/3124933

Change-Id: I17b6d4d4259d960a37c5f55b16a7ba6f6cd9d013
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2024-06-12 15:32:01 +00:00 committed by Automerger Merge Worker
commit bf85dfabff

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;