From e0853bf1f32ab5298df0b42cb31ee8cb9fe71aaac31393269244de4361c5a484 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 22 Oct 2018 12:52:52 +0000 Subject: [PATCH] - dmidecode-fix-redfish-hostname-print-length.patch: Fix Redfish Hostname print length (bsc#1112755). OBS-URL: https://build.opensuse.org/package/show/Base:System/dmidecode?expand=0&rev=47 --- ...de-fix-redfish-hostname-print-length.patch | 28 +++++++++++++++++++ dmidecode.changes | 8 +++++- dmidecode.spec | 2 ++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 dmidecode-fix-redfish-hostname-print-length.patch diff --git a/dmidecode-fix-redfish-hostname-print-length.patch b/dmidecode-fix-redfish-hostname-print-length.patch new file mode 100644 index 0000000..6e50aa1 --- /dev/null +++ b/dmidecode-fix-redfish-hostname-print-length.patch @@ -0,0 +1,28 @@ +From: Charles Rose +Date: Mon, 22 Oct 2018 09:48:02 +0200 +Subject: dmidecode: Fix Redfish Hostname print length +Git-commit: fde47bb227b8fa817c88d7e10a8eb771c46de1df +Patch-mainline: yes +References: bsc#1112755 + +Redfish Hostname prints beyond hlen characters. Fix it. + +Signed-off-by: Charles Rose +Fixes: 78539b06117c ("dmidecode: Parse Modern Management Controller blocks") +Acked-by: Neil Horman +Signed-off-by: Jean Delvare +--- + dmidecode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -3609,7 +3609,7 @@ static void dmi_parse_protocol_record(co + hname = out_of_spec; + hlen = strlen(out_of_spec); + } +- printf("%s\t\tRedfish Service Hostname: %*s\n", prefix, hlen, hname); ++ printf("%s\t\tRedfish Service Hostname: %.*s\n", prefix, hlen, hname); + } + + /* diff --git a/dmidecode.changes b/dmidecode.changes index d5f8f2f..3bf2b2d 100644 --- a/dmidecode.changes +++ b/dmidecode.changes @@ -1,7 +1,13 @@ +------------------------------------------------------------------- +Mon Oct 22 14:51:29 CEST 2018 - jdelvare@suse.de + +- dmidecode-fix-redfish-hostname-print-length.patch: Fix Redfish + Hostname print length (bsc#1112755). + ------------------------------------------------------------------- Mon Sep 17 13:01:40 CEST 2018 - jdelvare@suse.de -- Update to upstream version 3.2: +- Update to upstream version 3.2 (FATE#326044): * [COMPATIBILITY] The UUID is now displayed using lowercase letters, per RFC 4122 (#53569). You must ensure that any code parsing it is case-insensitive. diff --git a/dmidecode.spec b/dmidecode.spec index 154d22f..c840daa 100644 --- a/dmidecode.spec +++ b/dmidecode.spec @@ -27,6 +27,7 @@ Source0: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{vers Source1: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz.sig # https://savannah.nongnu.org/project/memberlist-gpgkeys.php?group=dmidecode Source2: %{name}.keyring +Patch1: dmidecode-fix-redfish-hostname-print-length.patch Provides: pmtools:%{_sbindir}/dmidecode Obsoletes: pmtools < 20071117 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -49,6 +50,7 @@ the BIOS told it to. %prep %setup -q +%patch1 -p1 %build make CFLAGS="%{optflags}" %{?_smp_mflags}