Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55c047fd authored by Chungkai Mei's avatar Chungkai Mei Committed by Chung-Kai (Michael) Mei
Browse files

libmodprobe: use ordered map for deterministic module loading



To ensure stable loading of parallel modules, switch to an ordered map structure. This will prevent potential dependency issues and conflicts.

Bug: 314213605
Change-Id: I8e00678e18417550b3be0c4228e4908a830e648c
Signed-off-by: default avatarChungkai Mei <chungkai@google.com>
parent ac68a8b7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -447,7 +447,7 @@ bool Modprobe::IsBlocklisted(const std::string& module_name) {
// Softdeps are taken care in InsmodWithDeps().
bool Modprobe::LoadModulesParallel(int num_threads) {
    bool ret = true;
    std::unordered_map<std::string, std::vector<std::string>> mod_with_deps;
    std::map<std::string, std::vector<std::string>> mod_with_deps;

    // Get dependencies
    for (const auto& module : module_load_) {