+ /* Try and find PCI class ID */
+ for (cp = buf; !(cp[0] == 0 && cp[1] == 0); cp++)
+ if (*cp == '&' && sscanf_s(cp,
+ "&CC_%" PRIx32, &class_id) == 1) {
+ /*
+ * If the Programming Interface code is not specified,
+ * assume that it is zero.
+ */
+ if (strspn(cp + 4, RTE_PCI_DRV_CLASSID_DIGIT) == 4)
+ class_id <<= 8;
+ break;
+ }
+