-static int
-eal_parse_use_device(const char *optarg)
-{
- struct rte_pci_addr addr;
- char *dup, *sep;
-
- dup = strdup(optarg);
- if (dup == NULL)
- return -1;
-
- /* remove arguments in 'dup' string */
- sep = strchr(dup, ',');
- if (sep != NULL)
- *sep = '\0';
-
- /* if argument is a PCI address, it's a whitelisted device */
- if (eal_parse_pci_DomBDF(dup, &addr) == 0 ||
- eal_parse_pci_BDF(dup, &addr) == 0) {
- rte_eal_devargs_add(RTE_DEVTYPE_WHITELISTED_PCI, optarg);
- } else {
- rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, optarg);
- }
-
- free(dup);
- return 0;
-}
-