diff --git a/dmidecode.spec b/dmidecode.spec index 899342286ecb4536be5e51e05e6fa0ea62706f4d..a3f2d391f14a085fe1ef69862763a3d316de6040 100644 --- a/dmidecode.spec +++ b/dmidecode.spec @@ -1,6 +1,6 @@ Name: dmidecode Version: 3.5 -Release: 3 +Release: 4 Epoch: 1 Summary: DMI data report tool @@ -11,6 +11,7 @@ Source0: http://download.savannah.gnu.org/releases/dmidecode/%{name}-%{version}. Patch6000: bugfix-compat_uuid.patch Patch6001: Consistently-use-read_file-when-reading-from-a-dump-file.patch Patch6002: backport-Support-Loongarch.patch +Patch6003: range-size-unit-is-K-change-to-bytes.patch BuildRequires: make gcc xz @@ -52,6 +53,9 @@ make %{?_smp_mflags} CFLAGS="%{__global_cflags}" LDFLAGS="%{__global_ldflags}" %{_mandir}/man8/*.8.gz %changelog +* Wed Dec 24 2025 zhangjian - 1:3.5-4 +- fix print for 64bit range + * Fri Sep 20 2024 liyunqing - 1:3.5-3 - Type:backport - ID:NA diff --git a/range-size-unit-is-K-change-to-bytes.patch b/range-size-unit-is-K-change-to-bytes.patch new file mode 100644 index 0000000000000000000000000000000000000000..c25f46f8078d4235e89258a376e141cc8a632417 --- /dev/null +++ b/range-size-unit-is-K-change-to-bytes.patch @@ -0,0 +1,31 @@ +From 1cea8f3a6fd05f9ab3f786788c05dfa838258dd9 Mon Sep 17 00:00:00 2001 +From: foolstrong +Date: Wed, 24 Dec 2025 06:40:59 +0000 +Subject: [PATCH] range size unit is K, change to bytes + +--- + dmidecode.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/dmidecode.c b/dmidecode.c +index c3d5092..a3f1c20 100644 +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -3094,7 +3094,13 @@ static void dmi_mapped_address_extended_size(u64 start, u64 end) + if (start.h == end.h && start.l == end.l) + pr_attr("Range Size", "Invalid"); + else +- dmi_print_memory_size("Range Size", u64_range(start, end), 0); ++ { ++ u64 old, new; ++ old = u64_range(start, end); ++ new.h = (old.h << 10) | (old.l >> 22); ++ new.l = old.l << 10; ++ dmi_print_memory_size("Range Size", new, 0); ++ } + } + + /* +-- +2.33.0 +