~danyspin97/initrz

297ae8b3f8da852dd66244ecaf8840baff3524df — Danilo Spinella 4 months ago 2ebce95
initrz: Remove unused function load_all_modules
1 files changed, 0 insertions(+), 24 deletions(-)

M src/initrz/src/module_loader.rs
M src/initrz/src/module_loader.rs => src/initrz/src/module_loader.rs +0 -24
@@ 179,30 179,6 @@ impl ModuleLoader {
        Ok(true)
    }

    pub fn load_all_modules(&self) -> Result<()> {
        Vec::<PathBuf>::try_from(
            Dowser::filtered(|p: &Path| {
                let ext = p.extension();
                match ext {
                    Some(ext) => ext == "ko",
                    None => false,
                }
            })
            .with_path(&self.kernel_root.join("kernel")),
        )?
        .iter()
        .map(|module| module.file_stem())
        .filter(|module| module.is_some())
        .filter_map(|module| module.unwrap().to_str())
        .map(|module| -> Result<()> {
            self.load_module(module)?;
            Ok(())
        })
        .collect::<Result<()>>()?;

        Ok(())
    }

    pub fn load_modalias(&self, modalias: &str) -> Result<()> {
        let modalias = &self.aliases.iter().find(|m| m.pattern.matches(modalias));
        if let Some(modalias) = modalias {