Remove redundant log statement in echo1 and add confirmation log in reset_device
All checks were successful
/ release (nightly) (push) Successful in 1m51s

This commit is contained in:
Edgar P. Burkhart 2025-05-21 13:53:13 +02:00
parent 86cf230f21
commit bc090fa9b2
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -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}");
}
}
}