Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Nov 2008 17:21:24 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 152938 for review
Message-ID:  <200811131721.mADHLOro055133@repoman.freebsd.org>

index | next in thread | raw e-mail

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

Change 152938 by hselasky@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;


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811131721.mADHLOro055133>