summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-02-25 16:33:34 -0800
committerKeith Packard <keithp@keithp.com>2010-02-25 16:34:44 -0800
commit1e60deca147c85a064719dfad14ccabd1049bbbd (patch)
treec1f89dea59eeffbdec6abe629fc90d830171136b
parentf4d5790a284e2d02dd7568fbca90402fa5ed1aea (diff)
Allow product names to have suffixes (like board revisions)
When looking for a board by product name, just look at the prefix of the name instead of requiring an exact match. This will allow products to have board version suffixes. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--ao-tools/lib/cc-usbdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ao-tools/lib/cc-usbdev.c b/ao-tools/lib/cc-usbdev.c
index ed39c062..afa91d49 100644
--- a/ao-tools/lib/cc-usbdev.c
+++ b/ao-tools/lib/cc-usbdev.c
@@ -258,7 +258,7 @@ match_dev(char *product, int serial)
return NULL;
for (i = 0; i < devs->ndev; i++) {
dev = devs->dev[i];
- if (product && strcmp (product, dev->product) != 0)
+ if (product && strncmp (product, dev->product, strlen(product)) != 0)
continue;
if (serial && serial != dev->serial)
continue;