From 1db2d481eab6bba6ccbf853e46cea990c1600930 Mon Sep 17 00:00:00 2001 From: Chungkai Mei Date: Thu, 11 Apr 2024 08:49:06 +0000 Subject: [PATCH] libmodprobe: remove dummy parameters for kernel we consume load_sequential only in libmodprobe, so remove this parameter before sending them into kernel layer Bug: 332435366 Test: Built and boot husky targets Change-Id: I37e63723d3c8d4fd8ca1fda682b344a721b9a637 Signed-off-by: Chungkai Mei --- libmodprobe/libmodprobe.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libmodprobe/libmodprobe.cpp b/libmodprobe/libmodprobe.cpp index 5023c7902..1a40da122 100644 --- a/libmodprobe/libmodprobe.cpp +++ b/libmodprobe/libmodprobe.cpp @@ -484,7 +484,11 @@ bool Modprobe::LoadModulesParallel(int num_threads) { return false; } - if (module_options_[cnd_last].find("load_sequential=1") != std::string::npos) { + std::string str = "load_sequential=1"; + auto it = module_options_[cnd_last].find(str); + if (it != std::string::npos) { + module_options_[cnd_last].erase(it, it + str.size()); + if (!LoadWithAliases(cnd_last, true)) { return false; }