diff options
author | Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> | 2017-06-08 16:38:25 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-06-13 12:35:59 +0300 |
commit | 0f0cdb27cec59d2a178970e86c6112f24feaf1d4 (patch) | |
tree | 018a98cc149df46b7d306207288c44797492611d /meta-phosphor/common/recipes-phosphor/leds | |
parent | 33a391e6ca1cd2483963d66824f39a41400588d9 (diff) | |
download | openbmc-0f0cdb27cec59d2a178970e86c6112f24feaf1d4.tar.xz |
LEDS: Update udev rule to pass $name than $devpath
Physical LED controller expects a sysfs path where it can find leds.
Current UDEV rule is passing $devpath and that works fine.
Because '-' is converted to '/' when systemd unit file processes it,
application needs to put a workaround to fetch the name of LED
correctly if the LED itself contains '-' in it.
Although $devpath still works to apply that workaround, it becomes
difficult for the workaround to look for a particular directory to
go beyond looking for led-name since not all LEDs would be having
/sys/devices/platform/leds/leds. However, all of those would share
'sys-class-leds' and hence passing 'sys-class-leds' with $name
makes it appropriate.
Change-Id: Iab5c71cf0c6f601a25b9b4470b46d7fc4d930223
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/leds')
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules index 2a3291262a..372d81293f 100644 --- a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules +++ b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-sysfs/70-leds.rules @@ -1 +1 @@ -SUBSYSTEM=="leds", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xyz.openbmc_project.led.controller@sys$devpath" +SUBSYSTEM=="leds", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xyz.openbmc_project.led.controller@sys-class-leds-$name" |