Skip to content

Commit

Permalink
/proc/modules does not exist case fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eld4niz committed Apr 1, 2024
1 parent 3ed516f commit 73ec386
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kernel/lkm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl KernelModules<'_> {
_ => {}
}
let modules_content = util::exec_cmd("sh", &["-c", &module_read_cmd])
.expect("failed to read /proc/modules");
.unwrap_or_else(|_| String::new());
/* Parse content for module name, size and related information. */
for line in modules_content.lines() {
let columns: Vec<&str> = line.split_whitespace().collect();
Expand Down

0 comments on commit 73ec386

Please sign in to comment.