Skip to content

Commit 55ca589

Browse files
committed
Fix rpi-eeprom-update when using busybox find
The busybox implementation of find does not detect recursive nested symlinks, this results in it finding multiple instances of of_node matching -samefile, the result of which then fails the -e path test. The of_node symlink we're tyring to find should match the path /sys/bus/nvmem/devices/*/of_node so just limit the find depth to 3 as there's no point searching deeper than that. Signed-off-by: Allan Xavier <mr.a.xavier@googlemail.com>
1 parent b4b4605 commit 55ca589

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rpi-eeprom-update

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ getBootloaderConfig() {
126126

127127
if [ -f "${blconfig_alias}" ]; then
128128
local blconfig_ofnode_path="/sys/firmware/devicetree/base"$(strings "${blconfig_alias}")""
129-
local blconfig_ofnode_link=$(find -L /sys/bus/nvmem -samefile "${blconfig_ofnode_path}" 2>/dev/null)
129+
local blconfig_ofnode_link=$(find -L /sys/bus/nvmem -maxdepth 3 -samefile "${blconfig_ofnode_path}" 2>/dev/null)
130130

131131
if [ -e "${blconfig_ofnode_link}" ]; then
132132
blconfig_nvmem_path=$(dirname "${blconfig_ofnode_link}")

0 commit comments

Comments
 (0)