diff options
author | Mathias Kresin <dev@kresin.me> | 2018-04-04 08:38:24 +0200 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2018-04-04 09:12:39 +0200 |
commit | 3a4bf25fd6828fcc7172c36601774f8a279d7692 (patch) | |
tree | 23135d15ccdee2a25579cd43904d3213e7423c52 /package/base-files | |
parent | 0c26264dee0f870ebbd3b06508561c1c5d459530 (diff) | |
download | upstream-3a4bf25fd6828fcc7172c36601774f8a279d7692.tar.gz upstream-3a4bf25fd6828fcc7172c36601774f8a279d7692.tar.bz2 upstream-3a4bf25fd6828fcc7172c36601774f8a279d7692.zip |
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@kresin.me>
Diffstat (limited to 'package/base-files')
-rw-r--r-- | package/base-files/files/lib/functions/leds.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/package/base-files/files/lib/functions/leds.sh b/package/base-files/files/lib/functions/leds.sh index e4423b4cc8..8a1d21caef 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" } |