static int resolve_device_path(char *path) { int res; res = usb_path2devnum(path); if (res < 0) return -EINVAL; if (!res) return 0; match_bus = atoi(path); match_device = res; return 0; }
int resolve_device_path(struct dfu_if *dif) { int res; res = usb_path2devnum(dif->path); if (res < 0) return -EINVAL; if (!res) return 0; dif->bus = atoi(dif->path); dif->devnum = res; dif->flags |= DFU_IFF_DEVNUM; return res; }