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}