mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Fix returned data for the USB_GET_DEV_PORT_PATH IOCTL in particular
the value returned in the "udp_port_level" field. Reported by: Uffe Jakobsen <uffe@uffe.org> MFC after: 1 week
This commit is contained in:
parent
79b52c387e
commit
84e3f97e6d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277417
@ -1849,14 +1849,13 @@ ugen_get_port_path(struct usb_fifo *f, struct usb_device_port_path *dpp)
|
||||
if (nlevel > USB_DEVICE_PORT_PATH_MAX)
|
||||
goto error;
|
||||
|
||||
/* store total level of ports */
|
||||
dpp->udp_port_level = nlevel;
|
||||
|
||||
/* store port index array */
|
||||
next = udev;
|
||||
while (next->parent_hub != NULL) {
|
||||
nlevel--;
|
||||
|
||||
dpp->udp_port_no[nlevel] = next->port_no;
|
||||
dpp->udp_port_level = nlevel;
|
||||
|
||||
dpp->udp_port_no[--nlevel] = next->port_no;
|
||||
next = next->parent_hub;
|
||||
}
|
||||
return (0); /* success */
|
||||
|
Loading…
Reference in New Issue
Block a user