Loading libmodprobe/include/modprobe/modprobe.h +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,8 @@ class Modprobe { bool GetAllDependencies(const std::string& module, std::vector<std::string>* pre_dependencies, std::vector<std::string>* dependencies, std::vector<std::string>* post_dependencies); void ResetModuleCount() { module_count_ = 0; } int GetModuleCount() { return module_count_; } void EnableBlacklist(bool enable); void EnableVerbose(bool enable); Loading Loading @@ -65,5 +67,6 @@ class Modprobe { std::unordered_map<std::string, std::string> module_options_; std::set<std::string> module_blacklist_; std::unordered_set<std::string> module_loaded_; int module_count_ = 0; bool blacklist_enabled = false; }; libmodprobe/libmodprobe_ext.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ bool Modprobe::Insmod(const std::string& path_name, const std::string& parameter LOG(INFO) << "Loaded kernel module " << path_name; module_loaded_.emplace(canonical_name); module_count_++; return true; } Loading libmodprobe/libmodprobe_ext_test.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ bool Modprobe::Insmod(const std::string& path_name, const std::string& parameter } modules_loaded.emplace_back(path_name + options); module_count_++; return true; } Loading libmodprobe/libmodprobe_test.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ TEST(libmodprobe, Test) { EXPECT_TRUE(modules_loaded == expected_modules_loaded); EXPECT_TRUE(m.GetModuleCount() == 15); EXPECT_TRUE(m.Remove("test4")); GTEST_LOG_(INFO) << "Expected modules loaded after removing test4 (in order):"; Loading Loading
libmodprobe/include/modprobe/modprobe.h +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,8 @@ class Modprobe { bool GetAllDependencies(const std::string& module, std::vector<std::string>* pre_dependencies, std::vector<std::string>* dependencies, std::vector<std::string>* post_dependencies); void ResetModuleCount() { module_count_ = 0; } int GetModuleCount() { return module_count_; } void EnableBlacklist(bool enable); void EnableVerbose(bool enable); Loading Loading @@ -65,5 +67,6 @@ class Modprobe { std::unordered_map<std::string, std::string> module_options_; std::set<std::string> module_blacklist_; std::unordered_set<std::string> module_loaded_; int module_count_ = 0; bool blacklist_enabled = false; };
libmodprobe/libmodprobe_ext.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ bool Modprobe::Insmod(const std::string& path_name, const std::string& parameter LOG(INFO) << "Loaded kernel module " << path_name; module_loaded_.emplace(canonical_name); module_count_++; return true; } Loading
libmodprobe/libmodprobe_ext_test.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,7 @@ bool Modprobe::Insmod(const std::string& path_name, const std::string& parameter } modules_loaded.emplace_back(path_name + options); module_count_++; return true; } Loading
libmodprobe/libmodprobe_test.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ TEST(libmodprobe, Test) { EXPECT_TRUE(modules_loaded == expected_modules_loaded); EXPECT_TRUE(m.GetModuleCount() == 15); EXPECT_TRUE(m.Remove("test4")); GTEST_LOG_(INFO) << "Expected modules loaded after removing test4 (in order):"; Loading