Skip to content
Commit fd8c59b9 authored by Patrice Buriez's avatar Patrice Buriez Committed by Anas Nashif
Browse files

scripts/dfuutil: support both "alternate setting" name and number



Initial assumption with Arduino 101 was that the "alternate setting
name of the DFU interface" would be simple enough to be used as the
grep pattern when attempting to find the board in DFU mode.
However, for boards such as the 96Boards Carbon, this name includes
grep meta-characters, so the DFUUTIL_ALT environment variable is
provided as a numeric value, instead of the previously expected name
string.
In order to avoid false positives, we now check whether DFUUTIL_ALT
is a numeric value, and the grep pattern is adjusted accordingly to
search for either "alt=" or "name=".
Also take into account that the name might contain spaces.

Change-Id: I81351d03bd727b35093fd1280e2b8b6904f3c89b
Signed-off-by: default avatarPatrice Buriez <patrice.buriez@intel.com>
parent 724fcffb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment