i made a mistake in my detection patch for the last libcec update (see pr ports/177391) i repported the same id for the vendor and the product id: deviceList[iFound].iVendorId = CEC_VID; deviceList[iFound].iProductId = CEC_VID; I fixed the problem and now i sscanf() the product and the vendor id. new patch attached or can be fetched here: http://fneu.fr/freebsd/patch-src__lib__adapter__Pulse-Eight__USBCECAdapterDetection.cpp Fix: Patch attached with submission follows:
Maintainer of multimedia/libcec, Please note that PR ports/179517 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/179517 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Responsible Changed From-To: freebsd-ports-bugs->antoine Track
Hi! Patch approved. Manuel Le 12 juin 2013 =C3=A0 16:50, Edwin Groothuis <edwin@FreeBSD.org> a =C3=A9cr= it : > Maintainer of multimedia/libcec, >=20 > Please note that PR ports/179517 has just been submitted. >=20 > If it contains a patch for an upgrade, an enhancement or a bug fix > you agree on, reply to this email stating that you approve the patch > and a committer will take care of it. >=20 > The full text of the PR can be found at: > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/179517 >=20 > --=20 > Edwin Groothuis via the GNATS Auto Assign Tool > edwin@FreeBSD.org
Author: antoine Date: Wed Jun 12 19:05:12 2013 New Revision: 320716 URL: http://svnweb.freebsd.org/changeset/ports/320716 Log: Update adapter detection patch to report correct IDs PR: ports/179517 Submitted by: Mickael Maillot Approved by: Manuel Creach (maintainer) Modified: head/multimedia/libcec/Makefile head/multimedia/libcec/files/patch-src__lib__adapter__Pulse-Eight__USBCECAdapterDetection.cpp Modified: head/multimedia/libcec/Makefile ============================================================================== --- head/multimedia/libcec/Makefile Wed Jun 12 19:03:41 2013 (r320715) +++ head/multimedia/libcec/Makefile Wed Jun 12 19:05:12 2013 (r320716) @@ -3,6 +3,7 @@ PORTNAME= libcec PORTVERSION= 2.1.3 +PORTREVISION= 1 CATEGORIES= multimedia MASTER_SITES= GH Modified: head/multimedia/libcec/files/patch-src__lib__adapter__Pulse-Eight__USBCECAdapterDetection.cpp ============================================================================== --- head/multimedia/libcec/files/patch-src__lib__adapter__Pulse-Eight__USBCECAdapterDetection.cpp Wed Jun 12 19:03:41 2013 (r320715) +++ head/multimedia/libcec/files/patch-src__lib__adapter__Pulse-Eight__USBCECAdapterDetection.cpp Wed Jun 12 19:05:12 2013 (r320716) @@ -1,5 +1,5 @@ ---- ./src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp.orig 2013-05-13 13:09:14.000000000 +0000 -+++ ./src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp 2013-06-08 12:30:51.000000000 +0000 +--- ./src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp.orig 2013-05-13 15:09:14.000000000 +0200 ++++ ./src/lib/adapter/Pulse-Eight/USBCECAdapterDetection.cpp 2013-06-12 16:31:03.000000000 +0200 @@ -61,6 +61,8 @@ #include <libudev.h> } @@ -9,7 +9,7 @@ #include <stdio.h> #include <unistd.h> #endif -@@ -434,22 +436,68 @@ +@@ -434,22 +436,77 @@ } #elif defined(__FreeBSD__) char devicePath[PATH_MAX + 1]; @@ -25,13 +25,15 @@ { - (void)snprintf(devicePath, sizeof(devicePath), "/dev/ttyU%d", i); - if (strDevicePath && strcmp(devicePath, strDevicePath) != 0) ++ unsigned int iVendor, iProduct; + memset(infos, 0, sizeof(infos)); + (void)snprintf(sysctlname, sizeof(sysctlname), + "dev.umodem.%d.%%pnpinfo", i); + if (sysctlbyname(sysctlname, infos, &infos_size, + NULL, 0) != 0) + break; -+ if (strstr(infos, "vendor=0x2548") == NULL) ++ pos = strstr(infos, "vendor="); ++ if (pos == NULL) continue; - if (!access(devicePath, 0)) - { @@ -41,9 +43,16 @@ - deviceList[iFound].iProductId = CEC_VID; - deviceList[iFound].adapterType = ADAPTERTYPE_P8_EXTERNAL; // will be overridden when not doing a "quick scan" by the actual type - iFound++; -+ if (strstr(infos, "product=0x1001") == NULL -+ && strstr(infos, "product=0x1002") == NULL) ++ sscanf(pos, "vendor=%x ", &iVendor); ++ ++ pos = strstr(infos, "product="); ++ if (pos == NULL) + continue; ++ sscanf(pos, "product=%x ", &iProduct); ++ ++ if (iVendor != CEC_VID || (iProduct != CEC_PID && iProduct != CEC_PID2)) ++ continue; ++ + pos = strstr(infos, "ttyname="); + if (pos == NULL) + continue; @@ -82,8 +91,8 @@ } + snprintf(deviceList[iFound].strComPath, sizeof(deviceList[iFound].strComPath), "%s", devicePath); + snprintf(deviceList[iFound].strComName, sizeof(deviceList[iFound].strComName), "%s", devicePath); -+ deviceList[iFound].iVendorId = CEC_VID; -+ deviceList[iFound].iProductId = CEC_VID; ++ deviceList[iFound].iVendorId = iVendor; ++ deviceList[iFound].iProductId = iProduct; + deviceList[iFound].adapterType = ADAPTERTYPE_P8_EXTERNAL; // will be overridden when not doing a "quick scan" by the actual type + iFound++; } _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: feedback->closed Patch committed, thanks!