raspberrypi / usbboot

Raspberry Pi USB booting code, moved from tools repository
Apache License 2.0
878 stars 221 forks source link

Skip devices which don't match filter criteria #169

Closed nbuchwitz closed 1 year ago

nbuchwitz commented 1 year ago

Move the port and path filter match logic up to prevent rpiboot from loading any files if the device does not meet the given criteria. For devices that should be ignored, the current implementation generates numerous messages such as "Loading embedded: bootcode.bin." Because the check occurs AFTER the filters have been evaluated, file handling takes place even for ignored devices.

The reported behavior can be tested by calling rpiboot with port number (eg. -1) or path (eg. -p 1-1.3.4.4.1)

timg236 commented 1 year ago

LGTM