From 60fd567b32dcde2989f2ff471c3f89e1c8da2081 Mon Sep 17 00:00:00 2001 From: Aristeu Rozanski Date: Mon, 2 May 2022 10:09:16 -0400 Subject: [PATCH] Fix issue printing memory module sizes Resolves: #2080596 Signed-off-by: Aristeu Rozanski --- ...b7449c70f5ea4a0209ddb89c2f5f392d3b4b.patch | 51 +++++++++++++++++++ rasdaemon.spec | 7 ++- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 9415b7449c70f5ea4a0209ddb89c2f5f392d3b4b.patch diff --git a/9415b7449c70f5ea4a0209ddb89c2f5f392d3b4b.patch b/9415b7449c70f5ea4a0209ddb89c2f5f392d3b4b.patch new file mode 100644 index 0000000..5267fc8 --- /dev/null +++ b/9415b7449c70f5ea4a0209ddb89c2f5f392d3b4b.patch @@ -0,0 +1,51 @@ +commit 9415b7449c70f5ea4a0209ddb89c2f5f392d3b4b +Author: Muralidhara M K +Date: Tue Jul 27 06:36:45 2021 -0500 + + rasdaemon: ras-mc-ctl: Fix script to parse dimm sizes + + Removes trailing spaces at the end of a line from + file location and fixes --layout option to parse dimm nodes + to get the size of each dimm from ras-mc-ctl. + + Issue is reported https://github.com/mchehab/rasdaemon/issues/43 + Where '> ras-mc-ctl --layout' reports all 0s + + With this change the layout option prints the correct dimm sizes + > sudo ras-mc-ctl --layout + +-----------------------------------------------+ + | mc0 | + | csrow0 | csrow1 | csrow2 | csrow3 | + ----------+-----------------------------------------------+ + ... + channel7: | 16384 MB | 0 MB | 0 MB | 0 MB | + channel6: | 16384 MB | 0 MB | 0 MB | 0 MB | + ... + ----------+-----------------------------------------------+ + + Signed-off-by: Muralidhara M K + Signed-off-by: Naveen Krishna Chatradhi + Cc: Yazen Ghannam + Signed-off-by: Mauro Carvalho Chehab + Link: https://lkml.kernel.org/r/20210810183855.129076-1-nchatrad@amd.com/ + +diff --git a/util/ras-mc-ctl.in b/util/ras-mc-ctl.in +index 1e3aeb7..b22dd60 100755 +--- a/util/ras-mc-ctl.in ++++ b/util/ras-mc-ctl.in +@@ -246,6 +246,7 @@ sub parse_dimm_nodes + if (($file =~ /max_location$/)) { + open IN, $file; + my $location = ; ++ $location =~ s/\s+$//; + close IN; + my @temp = split(/ /, $location); + +@@ -288,6 +289,7 @@ sub parse_dimm_nodes + + open IN, $file; + my $location = ; ++ $location =~ s/\s+$//; + close IN; + + my @pos; diff --git a/rasdaemon.spec b/rasdaemon.spec index ab376cc..035a5c2 100644 --- a/rasdaemon.spec +++ b/rasdaemon.spec @@ -1,6 +1,6 @@ Name: rasdaemon Version: 0.6.7 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Utility to receive RAS error tracings License: GPLv2 URL: http://git.infradead.org/users/mchehab/rasdaemon.git @@ -24,6 +24,7 @@ Patch15: fc1dd37d422fc907416afd028514fff59b63ae12.patch Patch16: 6bc43db1b6b3d73805179c21d1dd5521e8dc0f74.patch Patch17: 2b6a54b0d31e02e657171fd27f4e31d996756bc6.patch Patch18: 7ccf12f5ae26a055926d175d908c7930293438c4.patch +Patch19: 9415b7449c70f5ea4a0209ddb89c2f5f392d3b4b.patch ExcludeArch: s390 s390x BuildRequires: make @@ -77,6 +78,7 @@ an utility for reporting current error counts from the EDAC sysfs files. %patch16 -p1 %patch17 -p1 %patch18 -p1 +%patch19 -p1 # The tarball is locked in time the first time aclocal was ran and will keep # requiring an older version of automake @@ -112,6 +114,9 @@ sed -i "s/^PAGE_CE_ACTION=.*/PAGE_CE_ACTION=account/" %{buildroot}/%{_sysconfdir %{_sysconfdir}/sysconfig/rasdaemon %changelog +* Mon May 02 2022 Aristeu Rozanski 0.6.7-7 +- Fix issue printing memory module sizes [2080596] + * Thu Mar 31 2022 Aristeu Rozanski 0.6.7-6 - Merging 2065729 fixes into 9.1 branch [2067499]