[Pcsclite-cvs-commit] r5508 - /trunk/PCSC/src/hotplug_macosx.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Fri Jan 14 08:44:52 UTC 2011


Author: rousseau
Date: Fri Jan 14 08:44:52 2011
New Revision: 5508

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5508
Log:
HPSearchHotPluggables(): use the same naming convention as used by Apple
PC/SC layer on Leopard (and later). The reader friendly name is used
instead of "usb:%04x/%04x" as documented in IFDHandler v3 API at
http://pcsclite.alioth.debian.org/api/group__IFDHandler.html#gabb9fe35a68fa080ce9397f0b830b1e7e

The same driver source code can be used by Apple PC/SC layer and by this
pcsc-lite.

Modified:
    trunk/PCSC/src/hotplug_macosx.c

Modified: trunk/PCSC/src/hotplug_macosx.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/hotplug_macosx.c?rev=5508&op=diff
==============================================================================
--- trunk/PCSC/src/hotplug_macosx.c (original)
+++ trunk/PCSC/src/hotplug_macosx.c Fri Jan 14 08:44:52 2011
@@ -759,12 +759,10 @@
 		{
 			char deviceName[MAX_DEVICENAME];
 
-			/* the format should be "usb:%04x/%04x:libusb:%s" but we do not
-			 * know the libusb string. So it is not possible to differentiate
-			 * two identical readers :-( */
-			snprintf(deviceName, sizeof(deviceName), "usb:%04x/%04x",
-				(unsigned int)a->m_driver->m_vendorId,
-				(unsigned int)a->m_driver->m_productId);
+			/* the format should be "usb:%04x/%04x" but Apple uses the
+			 * friendly name instead */
+			snprintf(deviceName, sizeof(deviceName),
+				"%s", a->m_driver->m_friendlyName);
 			deviceName[sizeof(deviceName)-1] = '\0';
 
 			RFAddReader(a->m_driver->m_friendlyName,




More information about the Pcsclite-cvs-commit mailing list