From fefcbe43737f71fd6774895ca7d5c868c5561e20 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Wed, 14 May 2025 22:19:06 +0200 Subject: [PATCH 1/3] Remove debug statement from manage_line function --- src/main.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 46e1964..a0e8fd5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,7 +25,6 @@ fn main() { } fn manage_line(line: String) { - dbg!(&line); if let Some((prefix, line)) = line.split_once(";") { if line.ends_with("PCIe link lost") { println!("PCIe link lost {prefix}"); From 86cf230f21c757c473f189f8d8d2f1e26be1a0f8 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Wed, 14 May 2025 22:22:29 +0200 Subject: [PATCH 2/3] Bump package version to 0.2.1 in Cargo.toml --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 714889d..3734388 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "phenix" description = "Utility to restart PCIe devices when link is lost." -version = "0.2.0" +version = "0.2.1" edition = "2024" license = "GPL-3.0-or-later" repository="https://code.edgarpierre.fr/edpibu/phenix" From bc090fa9b25469a0b71292c25805079a453f86ce Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Wed, 21 May 2025 13:53:13 +0200 Subject: [PATCH 3/3] Remove redundant log statement in echo1 and add confirmation log in reset_device --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index a0e8fd5..a9e001c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,6 +41,7 @@ fn manage_line(line: String) { fn reset_device(id: &str) { println!("Resetting {id}"); echo1(rm_file_path(&id)); + println!("Removed device {id}"); echo1(String::from("/sys/bus/pci/rescan")); println!("Rescanned PCI bus"); } @@ -52,7 +53,6 @@ fn echo1(path: String) { Ok(mut file) => { file.write_all(b"1") .expect("Failed to write to remove file"); - println!("Removed device {path}"); } } }