File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -634,7 +634,7 @@ find_be_candidates() {
634634# returns: 0 iff at least one valid BE was found
635635
636636populate_be_list () {
637- local be_list fs ret
637+ local be_list fs ret candidates
638638
639639 be_list=" ${1} "
640640 if [ -z " ${be_list} " ]; then
@@ -646,8 +646,10 @@ populate_be_list() {
646646 # Truncate the list to avoid stale entries
647647 : > " ${be_list} "
648648
649+ readarray -t candidates <<< " $( find_be_candidates 2>/dev/null )"
650+
649651 ret=1
650- while read -r fs ; do
652+ for fs in " ${candidates[@]} " ; do
651653 # Remove any existing cmdline cache
652654 rm -f " $( be_location " ${fs} " ) /cmdline"
653655
@@ -659,6 +661,6 @@ populate_be_list() {
659661 echo " ${fs} " >> " ${be_list} "
660662 ret=0
661663 fi
662- done <<< " $( find_be_candidates 2>/dev/null ) "
664+ done
663665 return $ret
664666}
You can’t perform that action at this time.
0 commit comments