repnop / fdt

Rust crate for Flattened Devicetree parsing
Mozilla Public License 2.0
40 stars 21 forks source link

Leading 0 cell removed when pretty printing #33

Open bjorn3 opened 4 months ago

bjorn3 commented 4 months ago

PCI Host bridges have a property called bus-range. This property is for example bus-range = <0x00 0xff> indicating a range from 0 to 255 (inclusive). This crate however prints it as bus-range = <0xff>, which confused me for a bit as I thought QEMU was omitting the begin of the range and only emitted the end. It was only when I printed the raw bytes that I realized it an error in the way this crate printed the property.

repnop commented 4 months ago

Thanks for the bug report! I'll take a look and see what I can do about it.