From cb9edcb7d6f5437183a7f653d098c7b1843462db Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Fri, 19 Jan 2024 19:11:05 +0100 Subject: [PATCH] Reduce log verbosity of Capability::parse_vendor by combining some logs --- pcid/src/pci/cap.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pcid/src/pci/cap.rs b/pcid/src/pci/cap.rs index 02b3301450..99fc3e09b2 100644 --- a/pcid/src/pci/cap.rs +++ b/pcid/src/pci/cap.rs @@ -182,10 +182,9 @@ impl Capability { }) } unsafe fn parse_vendor(reader: &R, offset: u8) -> Self { - log::info!("Vendor specific offset: {}", offset); - log::info!("Vendor specific next: {}", reader.read_u8((offset+1).into())); + let next = reader.read_u8(u16::from(offset+1)); let length = reader.read_u8(u16::from(offset+2)); - log::info!("Vendor specific cap len: {}", length); + log::info!("Vendor specific offset: {offset:#02x} next: {next:#02x} cap len: {length:#02x}"); let data = if length > 0 { let mut raw_data = reader.read_range(offset.into(), length.into()); raw_data.drain(3..).collect()