|
|
d9e469 |
From 099af4056912faa28bf1385fffa77e7bbb468b93 Mon Sep 17 00:00:00 2001
|
|
|
d9e469 |
From: Mauro Carvalho Chehab <m.chehab@samsung.com>
|
|
|
d9e469 |
Date: Thu, 15 Aug 2013 12:43:02 -0300
|
|
|
d9e469 |
Subject: [PATCH 13/32] ras-mc-ctl: Improve parser
|
|
|
d9e469 |
|
|
|
d9e469 |
Accept either . or : as layers separator at config files.
|
|
|
d9e469 |
|
|
|
d9e469 |
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
|
|
|
d9e469 |
---
|
|
|
d9e469 |
util/ras-mc-ctl.in | 4 ++--
|
|
|
d9e469 |
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
d9e469 |
|
|
|
d9e469 |
diff --git a/util/ras-mc-ctl.in b/util/ras-mc-ctl.in
|
|
|
d9e469 |
index 48d9b00..f5a8ce5 100755
|
|
|
d9e469 |
--- a/util/ras-mc-ctl.in
|
|
|
d9e469 |
+++ b/util/ras-mc-ctl.in
|
|
|
d9e469 |
@@ -481,14 +481,14 @@ sub parse_dimm_labels_file
|
|
|
d9e469 |
|
|
|
d9e469 |
next unless (my ($label, $info) = ($str =~ /^(.*)\s*:\s*(.*)$/i));
|
|
|
d9e469 |
|
|
|
d9e469 |
- unless ($info =~ /\d+(?:\.\d+)*/) {
|
|
|
d9e469 |
+ unless ($info =~ /\d+(?:[\.\:]\d+)*/) {
|
|
|
d9e469 |
log_error ("$file: $line: Invalid syntax, ignoring: \"$_\"\n");
|
|
|
d9e469 |
next;
|
|
|
d9e469 |
}
|
|
|
d9e469 |
|
|
|
d9e469 |
for my $target (split (/[, ]+/, $info)) {
|
|
|
d9e469 |
my $n;
|
|
|
d9e469 |
- my ($mc, $top, $mid, $low, $extra) = ($target =~ /(\d+)(?:\.(\d+)){0,1}(?:\.(\d+)){0,1}(?:\.(\d+)){0,1}(?:\.(\d+)){0,1}/);
|
|
|
d9e469 |
+ my ($mc, $top, $mid, $low, $extra) = ($target =~ /(\d+)(?:[\.\:](\d+)){0,1}(?:[\.\:](\d+)){0,1}(?:[\.\:](\d+)){0,1}(?:[\.\:](\d+)){0,1}/);
|
|
|
d9e469 |
|
|
|
d9e469 |
if (defined($extra)) {
|
|
|
d9e469 |
die ("Error: Only up to 3 layers are currently supported on label db \"$file\"\n");
|
|
|
d9e469 |
--
|
|
|
d9e469 |
1.7.1
|
|
|
d9e469 |
|