feat: update procfs
This commit is contained in:
@@ -15,7 +15,7 @@ pub fn get_process(_port: u16) -> Option<Process> {
|
|||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
pub fn get_process(port: u16) -> Option<Process> {
|
pub fn get_process(port: u16) -> Option<Process> {
|
||||||
let all_procs = match procfs::process::all_processes() {
|
let all_procs = match procfs::process::all_processes() {
|
||||||
Error(e) => {
|
Err(e) => {
|
||||||
rust_util::warning!("Get procfs all processes failed: {}", e);
|
rust_util::warning!("Get procfs all processes failed: {}", e);
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@ pub fn get_process(port: u16) -> Option<Process> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let tcp = match procfs::net::tcp() {
|
let tcp = match procfs::net::tcp() {
|
||||||
Error(e) => {
|
Err(e) => {
|
||||||
rust_util::warning!("Get procfs net tcp failed: {}", e);
|
rust_util::warning!("Get procfs net tcp failed: {}", e);
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user