[Pcsclite-cvs-commit] r6921 - in trunk/Drivers/ccid/src: . towitoko
ludovic.rousseau at free.fr
ludovic.rousseau at free.fr
Mon Jun 16 13:51:29 UTC 2014
Author: rousseau
Date: 2014-06-16 13:51:29 +0000 (Mon, 16 Jun 2014)
New Revision: 6921
Modified:
trunk/Drivers/ccid/src/ccid.c
trunk/Drivers/ccid/src/ccid_serial.c
trunk/Drivers/ccid/src/ccid_usb.c
trunk/Drivers/ccid/src/commands.c
trunk/Drivers/ccid/src/debug.h
trunk/Drivers/ccid/src/ifdhandler.c
trunk/Drivers/ccid/src/towitoko/atr.c
Log:
Rename DEBUG_INFO() in DEBUG_INFO1()
DEBUG_INFO is already used by UEFI as a debug level.
Modified: trunk/Drivers/ccid/src/ccid.c
===================================================================
--- trunk/Drivers/ccid/src/ccid.c 2014-06-16 13:46:31 UTC (rev 6920)
+++ trunk/Drivers/ccid/src/ccid.c 2014-06-16 13:51:29 UTC (rev 6921)
@@ -83,7 +83,7 @@
if (0x0200 == ccid_descriptor->IFD_bcdDevice)
{
ccid_descriptor->zlp = TRUE;
- DEBUG_INFO("ZLP fixup");
+ DEBUG_INFO1("ZLP fixup");
}
break;
@@ -156,7 +156,7 @@
DEBUG_INFO2(" bEntryValidationCondition: 0x%02X",
gff->bEntryValidationCondition);
- DEBUG_INFO(" Reader supports PC/SCv2 features:");
+ DEBUG_INFO1(" Reader supports PC/SCv2 features:");
DEBUG_INFO2(" VerifyPinStart: %s", YESNO(gff->VerifyPinStart));
DEBUG_INFO2(" VerifyPinFinish: %s", YESNO(gff->VerifyPinFinish));
DEBUG_INFO2(" ModifyPinStart: %s", YESNO(gff->ModifyPinStart));
Modified: trunk/Drivers/ccid/src/ccid_serial.c
===================================================================
--- trunk/Drivers/ccid/src/ccid_serial.c 2014-06-16 13:46:31 UTC (rev 6920)
+++ trunk/Drivers/ccid/src/ccid_serial.c 2014-06-16 13:51:29 UTC (rev 6921)
@@ -763,7 +763,7 @@
* starts at 9600 bauds, so let's first try this speed */
/* set serial port speed to 9600 bauds */
(void)cfsetspeed(¤t_termios, B9600);
- DEBUG_INFO("Set serial port baudrate to 9600 and correct configuration");
+ DEBUG_INFO1("Set serial port baudrate to 9600 and correct configuration");
if (tcsetattr(serialDevice[reader_index].fd, TCSANOW, ¤t_termios) == -1)
{
(void)close(serialDevice[reader_index].fd);
@@ -798,7 +798,7 @@
}
else
{
- DEBUG_INFO("CmdEscape to configure 115200 bauds failed");
+ DEBUG_INFO1("CmdEscape to configure 115200 bauds failed");
}
}
/* In case of a failure, reader is probably already at 115200
@@ -808,7 +808,7 @@
/* set serial port speed to 115200 bauds */
(void)cfsetspeed(¤t_termios, B115200);
- DEBUG_INFO("Set serial port baudrate to 115200 and correct configuration");
+ DEBUG_INFO1("Set serial port baudrate to 115200 and correct configuration");
if (tcsetattr(serialDevice[reader].fd, TCSANOW, ¤t_termios) == -1)
{
(void)close(serialDevice[reader].fd);
Modified: trunk/Drivers/ccid/src/ccid_usb.c
===================================================================
--- trunk/Drivers/ccid/src/ccid_usb.c 2014-06-16 13:46:31 UTC (rev 6920)
+++ trunk/Drivers/ccid/src/ccid_usb.c 2014-06-16 13:51:29 UTC (rev 6921)
@@ -188,7 +188,7 @@
if (to_exit)
{
- DEBUG_INFO("libusb_exit");
+ DEBUG_INFO1("libusb_exit");
libusb_exit(ctx);
ctx = NULL;
}
@@ -647,7 +647,7 @@
else
{
usbDevice[reader_index].ccid.arrayOfSupportedDataRates = NULL;
- DEBUG_INFO("bNumDataRatesSupported is 0");
+ DEBUG_INFO1("bNumDataRatesSupported is 0");
}
usbDevice[reader_index].ccid.bInterfaceProtocol = usb_interface->altsetting->bInterfaceProtocol;
usbDevice[reader_index].ccid.bNumEndpoints = usb_interface->altsetting->bNumEndpoints;
@@ -701,7 +701,7 @@
close_libusb_if_needed();
if (claim_failed)
return STATUS_COMM_ERROR;
- DEBUG_INFO("Device not found?");
+ DEBUG_INFO1("Device not found?");
return STATUS_NO_SUCH_DEVICE;
}
@@ -817,7 +817,7 @@
DEBUG_CRITICAL("Too many duplicate frame detected");
return STATUS_UNSUCCESSFUL;
}
- DEBUG_INFO("Duplicate frame detected");
+ DEBUG_INFO1("Duplicate frame detected");
goto read_again;
}
Modified: trunk/Drivers/ccid/src/commands.c
===================================================================
--- trunk/Drivers/ccid/src/commands.c 2014-06-16 13:46:31 UTC (rev 6920)
+++ trunk/Drivers/ccid/src/commands.c 2014-06-16 13:51:29 UTC (rev 6921)
@@ -191,19 +191,19 @@
if ((1 == voltage) && !(bVoltageSupport & 1))
{
- DEBUG_INFO("5V requested but not support by reader");
+ DEBUG_INFO1("5V requested but not support by reader");
voltage = 2; /* 3V */
}
if ((2 == voltage) && !(bVoltageSupport & 2))
{
- DEBUG_INFO("3V requested but not support by reader");
+ DEBUG_INFO1("3V requested but not support by reader");
voltage = 3; /* 1.8V */
}
if ((3 == voltage) && !(bVoltageSupport & 4))
{
- DEBUG_INFO("1.8V requested but not support by reader");
+ DEBUG_INFO1("1.8V requested but not support by reader");
voltage = 0; /* auto */
}
}
@@ -319,7 +319,7 @@
if ((pvs->ulDataLength + 19 == TxLength) &&
(bei2i((unsigned char*)(&pvs->ulDataLength)) == pvs->ulDataLength))
{
- DEBUG_INFO("Reversing order from big to little endian");
+ DEBUG_INFO1("Reversing order from big to little endian");
/* If ulDataLength is big endian, assume others are too */
/* reverse the byte order for 3 fields */
pvs->wPINMaxExtraDigit = BSWAP_16(pvs->wPINMaxExtraDigit);
@@ -393,7 +393,7 @@
tmp = TxBuffer[6];
TxBuffer[6] = TxBuffer[5];
TxBuffer[5] = tmp;
- DEBUG_INFO("Correcting wPINMaxExtraDigit for Dell keyboard");
+ DEBUG_INFO1("Correcting wPINMaxExtraDigit for Dell keyboard");
}
#endif
@@ -653,7 +653,7 @@
if ((pms->ulDataLength + 24 == TxLength) &&
(bei2i((unsigned char*)(&pms->ulDataLength)) == pms->ulDataLength))
{
- DEBUG_INFO("Reversing order from big to little endian");
+ DEBUG_INFO1("Reversing order from big to little endian");
/* If ulDataLength is big endian, assume others are too */
/* reverse the byte order for 3 fields */
pms->wPINMaxExtraDigit = BSWAP_16(pms->wPINMaxExtraDigit);
@@ -726,7 +726,7 @@
gemalto_modify_pin_bug = has_gemalto_modify_pin_bug(ccid_descriptor);
if (gemalto_modify_pin_bug)
{
- DEBUG_INFO("Gemalto CCID Modify Pin Bug");
+ DEBUG_INFO1("Gemalto CCID Modify Pin Bug");
/* The reader requests a value for bMsgIndex2 and bMsgIndex3
* even if they should not be present. So we fake
Modified: trunk/Drivers/ccid/src/debug.h
===================================================================
--- trunk/Drivers/ccid/src/debug.h 2014-06-16 13:46:31 UTC (rev 6920)
+++ trunk/Drivers/ccid/src/debug.h 2014-06-16 13:51:29 UTC (rev 6921)
@@ -65,7 +65,7 @@
#define DEBUG_CRITICAL5(fmt, data1, data2, data3, data4) if (LogLevel & DEBUG_LEVEL_CRITICAL) Log5(PCSC_LOG_CRITICAL, fmt, data1, data2, data3, data4)
/* DEBUG_INFO */
-#define DEBUG_INFO(fmt) if (LogLevel & DEBUG_LEVEL_INFO) Log1(PCSC_LOG_INFO, fmt)
+#define DEBUG_INFO1(fmt) if (LogLevel & DEBUG_LEVEL_INFO) Log1(PCSC_LOG_INFO, fmt)
#define DEBUG_INFO2(fmt, data) if (LogLevel & DEBUG_LEVEL_INFO) Log2(PCSC_LOG_INFO, fmt, data)
Modified: trunk/Drivers/ccid/src/ifdhandler.c
===================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c 2014-06-16 13:46:31 UTC (rev 6920)
+++ trunk/Drivers/ccid/src/ifdhandler.c 2014-06-16 13:51:29 UTC (rev 6921)
@@ -892,7 +892,7 @@
#endif
if (PPS_Exchange(reader_index, pps, &len, &pps[2]) != PPS_OK)
{
- DEBUG_INFO("PPS_Exchange Failed");
+ DEBUG_INFO1("PPS_Exchange Failed");
return IFD_ERROR_PTS_FAILURE;
}
@@ -1276,7 +1276,7 @@
if ((sizeof manufacturer == TxLength)
&& (memcmp(TxBuffer, manufacturer, sizeof manufacturer) == 0))
{
- DEBUG_INFO("IDToken: Manufacturer command");
+ DEBUG_INFO1("IDToken: Manufacturer command");
memcpy(RxBuffer, "KOBIL systems\220\0", 15);
*RxLength = 15;
return IFD_SUCCESS;
@@ -1285,7 +1285,7 @@
if ((sizeof product_name == TxLength)
&& (memcmp(TxBuffer, product_name, sizeof product_name) == 0))
{
- DEBUG_INFO("IDToken: Product name command");
+ DEBUG_INFO1("IDToken: Product name command");
memcpy(RxBuffer, "IDToken\220\0", 9);
*RxLength = 9;
return IFD_SUCCESS;
@@ -1296,7 +1296,7 @@
{
int IFD_bcdDevice = get_ccid_descriptor(reader_index)->IFD_bcdDevice;
- DEBUG_INFO("IDToken: Firmware version command");
+ DEBUG_INFO1("IDToken: Firmware version command");
*RxLength = sprintf((char *)RxBuffer, "%X.%02X",
IFD_bcdDevice >> 8, IFD_bcdDevice & 0xFF);
RxBuffer[(*RxLength)++] = 0x90;
@@ -1307,7 +1307,7 @@
if ((sizeof driver_version == TxLength)
&& (memcmp(TxBuffer, driver_version, sizeof driver_version) == 0))
{
- DEBUG_INFO("IDToken: Driver version command");
+ DEBUG_INFO1("IDToken: Driver version command");
#define DRIVER_VERSION "2012.2.7\220\0"
memcpy(RxBuffer, DRIVER_VERSION, sizeof DRIVER_VERSION -1);
*RxLength = sizeof DRIVER_VERSION -1;
@@ -1389,7 +1389,7 @@
if (!allowed)
{
- DEBUG_INFO("ifd exchange (Escape command) not allowed");
+ DEBUG_INFO1("ifd exchange (Escape command) not allowed");
return_value = IFD_COMMUNICATION_ERROR;
}
else
@@ -1724,7 +1724,7 @@
|| (TxBuffer[4] != 0x00) /* Lind */
)
{
- DEBUG_INFO("MCT Command refused by driver");
+ DEBUG_INFO1("MCT Command refused by driver");
return_value = IFD_COMMUNICATION_ERROR;
}
else
@@ -1865,7 +1865,7 @@
if (ret != IFD_SUCCESS)
{
- DEBUG_INFO("CmdEscape failed");
+ DEBUG_INFO1("CmdEscape failed");
/* simulate a card absent */
res[0] = 0;
}
@@ -1907,7 +1907,7 @@
int rv;
list_t plist, *values;
- DEBUG_INFO("Driver version: " VERSION);
+ DEBUG_INFO1("Driver version: " VERSION);
/* Info.plist full patch filename */
(void)snprintf(infofile, sizeof(infofile), "%s/%s/Contents/Info.plist",
@@ -2027,7 +2027,7 @@
/* Init TC1 */
atr->ib[0][ATR_INTERFACE_BYTE_TC].present = TRUE;
atr->ib[0][ATR_INTERFACE_BYTE_TC].value = 2;
- DEBUG_INFO("Extra EGT patch applied");
+ DEBUG_INFO1("Extra EGT patch applied");
}
if (SCARD_PROTOCOL_T1 == Protocol)
@@ -2044,7 +2044,7 @@
/* Init TC1 */
atr->ib[0][ATR_INTERFACE_BYTE_TC].present = TRUE;
atr->ib[0][ATR_INTERFACE_BYTE_TC].value = 2;
- DEBUG_INFO("Extra EGT patch applied");
+ DEBUG_INFO1("Extra EGT patch applied");
/* only the first TBi (i>2) must be used */
break;
Modified: trunk/Drivers/ccid/src/towitoko/atr.c
===================================================================
--- trunk/Drivers/ccid/src/towitoko/atr.c 2014-06-16 13:46:31 UTC (rev 6920)
+++ trunk/Drivers/ccid/src/towitoko/atr.c 2014-06-16 13:51:29 UTC (rev 6921)
@@ -338,7 +338,7 @@
if (PROTOCOL_UNSET == *protocol)
{
- DEBUG_INFO("no default protocol found in ATR. Using T=0");
+ DEBUG_INFO1("no default protocol found in ATR. Using T=0");
*protocol = ATR_PROTOCOL_TYPE_T0;
}
More information about the Pcsclite-cvs-commit
mailing list