pub fn module_closure(
modules_dir: &Path,
kernel_release: &str,
wanted: &[&str],
) -> Result<Vec<PathBuf>>Expand description
Resolve the transitive .ko dependency closure for wanted
modules, in load order (dependencies first).
modules_dir is the tree root (containing lib/modules/<release>/).
Module names are matched modprobe-style: dashes and underscores are
interchangeable and any .ko[.comp] suffix is ignored. Modules that
are built into the kernel (listed in modules.builtin) are skipped;
a name found in neither modules.dep nor modules.builtin is an
error. Compressed .ko.{xz,zst,gz} files are decompressed in place
and the returned paths point at the raw .ko (the guest loads it
via finit_module).