[openwrt/openwrt] base-files: get_dt_led: don't warn about missing led
LEDE Commits
lede-commits at lists.infradead.org
Wed Apr 4 00:16:37 PDT 2018
mkresin pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/3a4bf25fd6828fcc7172c36601774f8a279d7692
commit 3a4bf25fd6828fcc7172c36601774f8a279d7692
Author: Mathias Kresin <dev at kresin.me>
AuthorDate: Wed Apr 4 08:38:24 2018 +0200
base-files: get_dt_led: don't warn about missing led
It's intentional that some boards within a target don't have all LEDs
which are tried to be setup in a common script. Don't show a warning in
such cases.
Fixes: 4f4fc993db4c ("base-files: add more name source to get_dt_led helper function")
Signed-off-by: Mathias Kresin <dev at kresin.me>
---
package/base-files/files/lib/functions/leds.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/package/base-files/files/lib/functions/leds.sh b/package/base-files/files/lib/functions/leds.sh
index e4423b4..8a1d21c 100644
--- a/package/base-files/files/lib/functions/leds.sh
+++ b/package/base-files/files/lib/functions/leds.sh
@@ -10,8 +10,7 @@ get_dt_led() {
[ -f "$nodepath" ] && ledpath=$(cat "$nodepath")
[ -n "$ledpath" ] && \
label=$(cat "$basepath$ledpath/label" 2>/dev/null) || \
- label=$(cat "$basepath$ledpath/chan-name" 2>/dev/null) || \
- echo "led label not found" 1>&2
+ label=$(cat "$basepath$ledpath/chan-name" 2>/dev/null)
echo "$label"
}
More information about the lede-commits
mailing list