use crate::boot_code::BootCodeId;
use crate::Error;
#[cfg(feature = "trace")]
pub fn analysis_complete(anomalies: usize, partitions: usize, gaps: usize, boot: BootCodeId) {
tracing::debug!(anomalies, partitions, gaps, boot_code = ?boot, "analysis complete");
}
#[cfg(not(feature = "trace"))]
#[inline]
pub fn analysis_complete(_anomalies: usize, _partitions: usize, _gaps: usize, _boot: BootCodeId) {}
#[cfg(feature = "trace")]
pub fn ebr_walk_failed(ext_start: u64, err: &Error) {
tracing::warn!(ext_start, error = %err, "EBR chain walk failed");
}
#[cfg(not(feature = "trace"))]
#[inline]
pub fn ebr_walk_failed(_ext_start: u64, _err: &Error) {}
#[cfg(feature = "trace")]
pub fn partition_read_failed(byte_offset: u64, err: &Error) {
tracing::trace!(byte_offset, error = %err, "could not read partition first sector");
}
#[cfg(not(feature = "trace"))]
#[inline]
pub fn partition_read_failed(_byte_offset: u64, _err: &Error) {}
#[cfg(feature = "trace")]
pub fn ebr_truncated(ebr_lba: u64) {
tracing::trace!(ebr_lba, "EBR read past end of image — chain ends");
}
#[cfg(not(feature = "trace"))]
#[inline]
pub fn ebr_truncated(_ebr_lba: u64) {}
#[cfg(feature = "trace")]
pub fn ebr_no_signature(ebr_lba: u64) {
tracing::trace!(ebr_lba, "EBR has no 0x55AA signature — chain ends");
}
#[cfg(not(feature = "trace"))]
#[inline]
pub fn ebr_no_signature(_ebr_lba: u64) {}