summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2018-02-09 14:21:20 -0600
committerMatt Spinler <spinler@us.ibm.com>2018-02-27 14:20:01 +0000
commit312fa6baba47e6a6fa9001f577d2a8993e148dc9 (patch)
treed10c58dbad7001042c29771909129b7ab8bbbc31
parent8b34b33ffa0c60e12284a190dd4d59fc695a4018 (diff)
downloadphosphor-mrw-tools-312fa6baba47e6a6fa9001f577d2a8993e148dc9.tar.gz
phosphor-mrw-tools-312fa6baba47e6a6fa9001f577d2a8993e148dc9.zip
Remove LED naming workaround
This workaround didn't use the LED instance name if the LED was associated with a FRU, and used the FRU name instead for the device tree LED name. That won't work in the case that the LED is associated with a FRU but the device tree name already matches the instance name and not the FRU name, so the code must assume that the instance name will match the device tree name. Change-Id: Ifb2b73dcfd6d9d252b418c04a0ebfd1b98ea8e24 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
-rwxr-xr-xgen_led_groups.pl8
1 files changed, 2 insertions, 6 deletions
diff --git a/gen_led_groups.pl b/gen_led_groups.pl
index 818f2c4..d294563 100755
--- a/gen_led_groups.pl
+++ b/gen_led_groups.pl
@@ -141,12 +141,8 @@ foreach my $target (sort keys %{$targetObj->getAllTargets()})
$priority = "'On'";
}
- # Need this to populate the table incase the device is empty
- my $instance = $targetObj->getInstanceName($ledTarget);
-
- # All the fan instances have fan-fault-led and need to extract the
- # real name. If not, then what's in the instance holds good
- my $name = ($device eq '') ? $instance : $device;
+ #The MRW instance name must match the LED name in the device tree
+ my $name = $targetObj->getInstanceName($ledTarget);
# Get if this LED is a ENC-FAULT type.
if(!$targetObj->isBadAttribute($target, "LED_TYPE"))
OpenPOWER on IntegriCloud