mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-07-27 09:38:09 -07:00
also run formatter
This commit is contained in:
committed by
Markus Unterwaditzer
parent
94289dcad5
commit
ed3072eb8e
@@ -103,17 +103,13 @@ impl DiagDevice {
|
|||||||
loop {
|
loop {
|
||||||
match Self::try_new().await {
|
match Self::try_new().await {
|
||||||
Ok(device) => {
|
Ok(device) => {
|
||||||
info!(
|
info!("Diag device initialization succeeded after {num_retries} retries");
|
||||||
"Diag device initialization succeeded after {num_retries} retries"
|
|
||||||
);
|
|
||||||
return Ok(device);
|
return Ok(device);
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
num_retries += 1;
|
num_retries += 1;
|
||||||
if start_time.elapsed() >= max_duration {
|
if start_time.elapsed() >= max_duration {
|
||||||
error!(
|
error!("Failed to initialize diag device after {max_duration:?}: {e}");
|
||||||
"Failed to initialize diag device after {max_duration:?}: {e}"
|
|
||||||
);
|
|
||||||
return Err(e);
|
return Err(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,9 +339,7 @@ fn enable_frame_readwrite(fd: i32, mode: u32) -> DiagResult<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ret < 0 {
|
if ret < 0 {
|
||||||
let msg = format!(
|
let msg = format!("DIAG_IOCTL_SWITCH_LOGGING ioctl failed with error code {ret}");
|
||||||
"DIAG_IOCTL_SWITCH_LOGGING ioctl failed with error code {ret}"
|
|
||||||
);
|
|
||||||
return Err(DiagDeviceError::InitializationFailed(msg));
|
return Err(DiagDeviceError::InitializationFailed(msg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user