« Return to Thread: Remove leftovers from usbdevs

Remove leftovers from usbdevs

by Martin Pieuchot-2 :: Rate this Message:

| View in Thread

getdevicedesc() should have been deleted in the last commit and
cannot be used now that the bus node is open read-only.

ok?


Index: usbdevs.c
===================================================================
RCS file: /cvs/src/usr.sbin/usbdevs/usbdevs.c,v
retrieving revision 1.20
diff -u -p -r1.20 usbdevs.c
--- usbdevs.c 16 Jan 2011 00:04:47 -0000 1.20
+++ usbdevs.c 4 May 2012 13:33:44 -0000
@@ -47,7 +47,6 @@ int showdevs = 0;
 
 void usage(void);
 void usbdev(int f, int a, int rec);
-int getdevicedesc(int, int, usb_device_descriptor_t *);
 void usbdump(int f);
 void dumpone(char *name, int f, int addr);
 int main(int, char **);
@@ -145,25 +144,6 @@ usbdev(int f, int a, int rec)
  usbdev(f, s, 1);
  indent--;
  }
-}
-
-int
-getdevicedesc(int f, int addr, usb_device_descriptor_t *d)
-{
- struct usb_ctl_request req;
- int r;
-
- req.ucr_addr = addr;
- req.ucr_request.bmRequestType = UT_READ_DEVICE;
- req.ucr_request.bRequest = UR_GET_DESCRIPTOR;
- USETW2(req.ucr_request.wValue, UDESC_DEVICE, 0);
- USETW(req.ucr_request.wIndex, 0);
- USETW(req.ucr_request.wLength, USB_DEVICE_DESCRIPTOR_SIZE);
- req.ucr_data = d;
- req.ucr_flags = 0;
- if ((r = ioctl(f, USB_REQUEST, &req)) == -1)
- perror("getdevicedesc: ioctl");
- return (r != -1);
 }
 
 void

 « Return to Thread: Remove leftovers from usbdevs