mirror of
https://github.com/raspberrypi/rpi-eeprom.git
synced 2026-01-20 21:13:36 +08:00
Merge pull request #50 from MilhouseVH/single_vl805
use lspci if available instead of vl805. Avoid calling vl805 twice.
This commit is contained in:
@@ -388,8 +388,13 @@ getVL805CurrentVersion()
|
||||
# root then treat the version as unknown and skip VLI updates.
|
||||
VL805_CURRENT_VERSION=""
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
if vl805 | grep -q "VL805 FW version"; then
|
||||
VL805_CURRENT_VERSION=$(vl805 | grep "VL805 FW version" | awk '{print $4}')
|
||||
if command -v lspci >/dev/null; then
|
||||
vlver="$(lspci -d 1106:3483 -xxx | awk '/^50:/ { print "VL805 FW version: " $5 $4 $3 $2 }')"
|
||||
else
|
||||
vlver="$(vl805 | grep "VL805 FW version")"
|
||||
fi
|
||||
if [ -n "${vlver}" ]; then
|
||||
VL805_CURRENT_VERSION="${vlver#*: }"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user