~danyspin97/initrz

2ec1e501def5bec79127732a35f430f044170c05 — Danilo Spinella 4 months ago 9dc37d5
initrz: Add debug message in load_module
1 files changed, 2 insertions(+), 1 deletions(-)

M src/initrz/src/module_loader.rs
M src/initrz/src/module_loader.rs => src/initrz/src/module_loader.rs +2 -1
@@ 1,7 1,7 @@
use anyhow::{bail, Context, Result};
use dowser::Dowser;
use glob::{glob, Pattern};
use log::warn;
use log::{debug, warn};
use nix::kmod::{finit_module, ModuleInitFlags};

use std::collections::{HashMap, HashSet};


@@ 149,6 149,7 @@ impl ModuleLoader {
        let modules_loaded = self.modules_loaded.read().unwrap();
        if !modules_loaded.contains(module_name) {
            drop(modules_loaded);
            debug!("loading module {}", module_name);
            let module = self.modules.get(module_name);
            if module.is_none() {
                return Ok(false);