svn commit: r261270 - head/sys/dev/usb

Nick Hibma n_hibma at FreeBSD.org
Wed Jan 29 16:24:50 UTC 2014


Author: n_hibma
Date: Wed Jan 29 16:24:50 2014
New Revision: 261270
URL: http://svnweb.freebsd.org/changeset/base/261270

Log:
  Fix the ordering of the arguments to printf in
  uhub_child_location_string(). This produced bogus information in
  
  	dev.<USB driver>.<id>.%location
  
  output from sysctl.
  
  MFC after:	2 weeks

Modified:
  head/sys/dev/usb/usb_hub.c

Modified: head/sys/dev/usb/usb_hub.c
==============================================================================
--- head/sys/dev/usb/usb_hub.c	Wed Jan 29 15:50:01 2014	(r261269)
+++ head/sys/dev/usb/usb_hub.c	Wed Jan 29 16:24:50 2014	(r261270)
@@ -1597,8 +1597,9 @@ uhub_child_location_string(device_t pare
 		goto done;
 	}
 	snprintf(buf, buflen, "bus=%u hubaddr=%u port=%u devaddr=%u interface=%u",
+	    device_get_unit(res.udev->bus->bdev),
 	    (res.udev->parent_hub != NULL) ? res.udev->parent_hub->device_index : 0,
-	    res.portno, device_get_unit(res.udev->bus->bdev),
+	    res.portno,
 	    res.udev->device_index, res.iface_index);
 done:
 	mtx_unlock(&Giant);


More information about the svn-src-all mailing list