PERFORCE change 152938 for review

Hans Petter Selasky hselasky at FreeBSD.org
Thu Nov 13 09:21:25 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=152938

Change 152938 by hselasky at hselasky_laptop001 on 2008/11/13 17:20:52

	
	Don't poll standard input because libusb
	will not ensure that its data gets read.

Affected files ...

.. //depot/projects/usb/src/lib/libusb20/libusb20.c#10 edit

Differences ...

==== //depot/projects/usb/src/lib/libusb20/libusb20.c#10 (text+ko) ====

@@ -886,7 +886,7 @@
 void
 libusb20_dev_wait_process(struct libusb20_device *pdev, int timeout)
 {
-	struct pollfd pfd[2];
+	struct pollfd pfd[1];
 
 	if (!pdev->is_opened) {
 		return;
@@ -894,11 +894,8 @@
 	pfd[0].fd = pdev->file;
 	pfd[0].events = (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM);
 	pfd[0].revents = 0;
-	pfd[1].fd = 0;			/* standard input */
-	pfd[1].events = (POLLIN | POLLRDNORM);
-	pfd[1].revents = 0;
 
-	if (poll(pfd, 2, timeout)) {
+	if (poll(pfd, 1, timeout)) {
 		/* ignore any error */
 	}
 	return;


More information about the p4-projects mailing list