Allow product names to have suffixes (like board revisions)
[fw/altos] / ao-tools / lib / cc-usbdev.c
index ed39c0628c955deb5c1d28bd528ad842e5590745..afa91d49fed1f3e3fbfcfb7d815ff60385c1263b 100644 (file)
@@ -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;