summaryrefslogtreecommitdiff
path: root/firmware/fw_userhelper.sh
diff options
context:
space:
mode:
authorMilosz Wasilewski <milosz.wasilewski@hackbox.linaro.org>2015-11-01 23:02:07 +0000
committerMilosz Wasilewski <milosz.wasilewski@hackbox.linaro.org>2015-11-01 23:02:07 +0000
commit3bec060acae04c0b799822e813c62b94cffbe3f7 (patch)
treed4f7884c8282aed5ac71c8b297589d94dddc4b8a /firmware/fw_userhelper.sh
parent751dc08e504621a230a1b556abdd2c660953708d (diff)
Update to commit: 32b88194f71d6ae7768a29f87fbba454728273ee32b88194f71d6ae7768a29f87fbba454728273ee
from repo: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git branch: master
Diffstat (limited to 'firmware/fw_userhelper.sh')
-rwxr-xr-x[-rw-r--r--]firmware/fw_userhelper.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/firmware/fw_userhelper.sh b/firmware/fw_userhelper.sh
index 6efbade..b9983f8 100644..100755
--- a/firmware/fw_userhelper.sh
+++ b/firmware/fw_userhelper.sh
@@ -9,7 +9,17 @@ modprobe test_firmware
DIR=/sys/devices/virtual/misc/test_firmware
-OLD_TIMEOUT=$(cat /sys/class/firmware/timeout)
+# CONFIG_FW_LOADER_USER_HELPER has a sysfs class under /sys/class/firmware/
+# These days no one enables CONFIG_FW_LOADER_USER_HELPER so check for that
+# as an indicator for CONFIG_FW_LOADER_USER_HELPER.
+HAS_FW_LOADER_USER_HELPER=$(if [ -d /sys/class/firmware/ ]; then echo yes; else echo no; fi)
+
+if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then
+ OLD_TIMEOUT=$(cat /sys/class/firmware/timeout)
+else
+ echo "usermode helper disabled so ignoring test"
+ exit 0
+fi
FWPATH=$(mktemp -d)
FW="$FWPATH/test-firmware.bin"