Package: rust-dmidecode / 1.0.0-2

Metadata

Package Version Patches format
rust-dmidecode 1.0.0-2 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
fix s390x.patch | (download)

src/lib.rs | 17 17 + 0 - 0 !
src/structures/000_bios.rs | 14 7 + 7 - 0 !
src/structures/002_baseboard.rs | 2 1 + 1 - 0 !
src/structures/003_enclosure.rs | 2 1 + 1 - 0 !
src/structures/004_processor.rs | 92 46 + 46 - 0 !
src/structures/007_cache.rs | 34 17 + 17 - 0 !
src/structures/009_system_slots.rs | 4 2 + 2 - 0 !
7 files changed, 91 insertions(+), 74 deletions(-)

 fix endianness bugs on big-endian architectures (s390x)
 The SMBIOS specification defines all multi-byte fields as little-endian.
 The crate used unsafe ptr::read casts on #[repr(C,packed)] structs to
 deserialise binary data, which reads fields in native byte order. This is
 correct on little-endian hosts but produces wrong values on big-endian
 hosts such as s390x, causing test failures and incorrect parsed output
 .
 Fix by applying u{16,32,64}::from_le() to every multi-byte field read
 from a packed struct or via the generic read_bytes helper
fix assert_eq import.patch | (download)

src/lib.rs | 1 0 + 1 - 0 !
1 file changed, 1 deletion(-)

 fix ambiguous assert_eq import in structure_strings test
 Drop pretty_assertions::assert_eq from the test that also imports
 std::prelude::v1::*, which causes an ambiguous name error.