-/* $OpenBSD: ucom.c,v 1.77 2023/10/02 23:38:11 krw Exp $ */
+/* $OpenBSD: ucom.c,v 1.78 2023/10/06 16:06:11 krw Exp $ */
/* $NetBSD: ucom.c,v 1.49 2003/01/01 00:10:25 thorpej Exp $ */
/*
int rslt;
unsigned int unit;
uint32_t route;
- uint8_t bus, ifaceidx;
+ uint8_t bus, ifaceno;
KERNEL_ASSERT_LOCKED();
if (sc == NULL || sc->sc_iface == NULL)
continue;
if (usbd_get_location(sc->sc_uparent, sc->sc_iface,
- &bus, &route, &ifaceidx) == -1)
+ &bus, &route, &ifaceno) == -1)
continue;
rslt = snprintf(name, sizeof(name),
"%s:usb%u.%u.%05x.%u,", sc->sc_dev.dv_xname, bus,
- ROUTEROOTPORT(route), ROUTESTRING(route), ifaceidx);
+ ROUTEROOTPORT(route), ROUTESTRING(route), ifaceno);
if (rslt < sizeof(name) && (strlen(ucoms) + rslt) <
ucomslen)
strlcat(ucoms, name, ucomslen);
-/* $OpenBSD: usb_subr.c,v 1.161 2023/10/02 23:38:11 krw Exp $ */
+/* $OpenBSD: usb_subr.c,v 1.162 2023/10/06 16:06:11 krw Exp $ */
/* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
int
usbd_get_location(struct usbd_device *dev, struct usbd_interface *iface,
- uint8_t *bus, uint32_t *route, uint8_t *ifaceidx)
+ uint8_t *bus, uint32_t *route, uint8_t *ifaceno)
{
int i;
uint32_t r;
if (iface == &dev->ifaces[i]) {
*bus = dev->bus->usbctl->dv_unit;
*route = (usbd_get_routestring(dev, &r)) ? 0 : r;
- *ifaceidx = i;
+ *ifaceno = i;
return 0;
}
}