aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/x86/base-files/etc/diag.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/target/linux/x86/base-files/etc/diag.sh b/target/linux/x86/base-files/etc/diag.sh
index 3af4b23583..d043e4f035 100644
--- a/target/linux/x86/base-files/etc/diag.sh
+++ b/target/linux/x86/base-files/etc/diag.sh
@@ -20,6 +20,8 @@ preinit_match_diag_led() {
json_init
json_load "$(cat $CFG)"
json_get_keys keys led
+ json_is_a led object || return
+
json_select led
for key in $keys; do
json_select "$key"