提交 9cc85320 编写于 作者: L Luis R. Rodriguez 提交者: Greg Kroah-Hartman

test_firmware: replace syfs fallback check with kconfig_has helper

Now that we have a kconfig checker just use that instead of relying
on testing a sysfs directory being present, since our requirements
are spelled out.
Acked-by: NKees Cook <keescook@chromium.org>
Signed-off-by: NLuis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ef557787
...@@ -11,10 +11,7 @@ source $TEST_DIR/fw_lib.sh ...@@ -11,10 +11,7 @@ source $TEST_DIR/fw_lib.sh
check_mods check_mods
# CONFIG_FW_LOADER_USER_HELPER has a sysfs class under /sys/class/firmware/ HAS_FW_LOADER_USER_HELPER=$(kconfig_has CONFIG_FW_LOADER_USER_HELPER=y)
# 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)
HAS_FW_LOADER_USER_HELPER_FALLBACK=$(kconfig_has CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y) HAS_FW_LOADER_USER_HELPER_FALLBACK=$(kconfig_has CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y)
if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册