3 FIRMWARE_DIRS="/lib/firmware/$(uname -r) /lib/firmware"
7 logger -t "${0##*/}[$$]" "$@" 2>/dev/null || true
10 if [ ! -e /sys$DEVPATH/loading ]; then
11 err "udev firmware loader misses sysfs directory"
15 for DIR in $FIRMWARE_DIRS; do
16 [ -e "$DIR/$FIRMWARE" ] || continue
17 echo 1 > /sys$DEVPATH/loading
18 cat "$DIR/$FIRMWARE" > /sys$DEVPATH/data
19 echo 0 > /sys$DEVPATH/loading
23 echo -1 > /sys$DEVPATH/loading
24 err "Cannot find firmware file '$FIRMWARE'"
25 mkdir -p /dev/.udev/firmware-missing
26 file=$(echo "$FIRMWARE" | sed 's:/:\\x2f:g')
27 ln -s -f "$DEVPATH" /dev/.udev/firmware-missing/$file