From 8a3d4ef20419b3f9ed5df41d2691c95ec9ba8760 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Tue, 26 May 2015 22:07:32 -0700 Subject: [PATCH] Simplify eventmask parsing --- pandora_server/util/plugin/ipmi-plugin.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/util/plugin/ipmi-plugin.pl b/pandora_server/util/plugin/ipmi-plugin.pl index 6d5bf013a0..be361fb49b 100755 --- a/pandora_server/util/plugin/ipmi-plugin.pl +++ b/pandora_server/util/plugin/ipmi-plugin.pl @@ -54,7 +54,7 @@ my ($sensor_id, $name, $type, $value, $units, $eventmask) = split(/,/, $res); #Output the value if ($value eq 'N/A') { if ($eventmask =~ /([0-9A-Fa-f]+)h/) { - print hex substr($eventmask, 0, -1); + print hex $1; } else { print $eventmask; }