Blob Blame History Raw
commit 129f20ba5e0b8b5881539e0038e97ef353d5d294
Author: Cong Wang <xiyou.wangcong@gmail.com>
Date:   Fri Feb 28 12:37:15 2020 -0800

    Match rankX in ras-mc-ctl
    
    According to kernel doc:
    https://www.kernel.org/doc/html/v4.10/admin-guide/ras.html
    mcX directory contains either dimmX or rankX directories.
    
    Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

diff --git a/util/ras-mc-ctl.in b/util/ras-mc-ctl.in
index b4e5856..5a4aaf6 100755
--- a/util/ras-mc-ctl.in
+++ b/util/ras-mc-ctl.in
@@ -247,7 +247,7 @@ sub parse_dimm_nodes
         $mc =~ s,.*mc(\d+).*,$1,;
 
         my $dimm = $file;
-        $dimm =~ s,.*dimm(\d+).*,$1,;
+        $dimm =~ s,.*(rank|dimm)(\d+).*,$2,;
 
         open IN, $file;
         my $location = <IN>;