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()