30a5bfae3e
Devices) driver and ICCD (Integrated Circuit(s) Card Devices). See the USB CCID and ICCD specifications from the USB working group.
94 lines
3.5 KiB
Text
94 lines
3.5 KiB
Text
$NetBSD: patch-ab,v 1.1.1.1 2008/03/04 11:30:08 shannonjr Exp $
|
|
|
|
--- src/commands.c.orig 2008-02-06 01:11:11.000000000 -0700
|
|
+++ src/commands.c
|
|
@@ -153,7 +153,7 @@ RESPONSECODE CmdPowerOn(unsigned int rea
|
|
|
|
/* Status Information? */
|
|
if (0x40 == tmp[0])
|
|
- ccid_error(tmp[2], __FILE__, __LINE__, __FUNCTION__);
|
|
+ ccid_error(tmp[2], __FILE__, __LINE__, (const char *) __FUNCTION__);
|
|
return IFD_COMMUNICATION_ERROR;
|
|
}
|
|
|
|
@@ -200,7 +200,7 @@ again:
|
|
|
|
if (buffer[STATUS_OFFSET] & CCID_COMMAND_FAILED)
|
|
{
|
|
- ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__); /* bError */
|
|
+ ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__); /* bError */
|
|
|
|
if (0xBB == buffer[ERROR_OFFSET] && /* Protocol error in EMV mode */
|
|
((GEMPC433 == ccid_descriptor->readerID)
|
|
@@ -711,7 +711,7 @@ again:
|
|
|
|
if (cmd_out[STATUS_OFFSET] & CCID_COMMAND_FAILED)
|
|
{
|
|
- ccid_error(cmd_out[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__); /* bError */
|
|
+ ccid_error(cmd_out[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__); /* bError */
|
|
return_value = IFD_COMMUNICATION_ERROR;
|
|
}
|
|
|
|
@@ -811,7 +811,7 @@ RESPONSECODE CmdPowerOff(unsigned int re
|
|
|
|
if (cmd[STATUS_OFFSET] & CCID_COMMAND_FAILED)
|
|
{
|
|
- ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__); /* bError */
|
|
+ ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__); /* bError */
|
|
return_value = IFD_COMMUNICATION_ERROR;
|
|
}
|
|
|
|
@@ -942,7 +942,7 @@ again_status:
|
|
|| (OZ776_7772 == ccid_descriptor->readerID))
|
|
&& (buffer[ERROR_OFFSET] == 0xFE)))
|
|
#endif
|
|
- ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__); /* bError */
|
|
+ ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__); /* bError */
|
|
|
|
/* card absent or mute is not an communication error */
|
|
if (buffer[ERROR_OFFSET] != 0xFE)
|
|
@@ -1028,7 +1028,7 @@ RESPONSECODE CCID_Transmit(unsigned int
|
|
int r;
|
|
|
|
/* Xfr Block */
|
|
- r = ControlUSB(reader_index, 0x21, 0x65, 0, tx_buffer, tx_length);
|
|
+ r = ControlUSB(reader_index, 0x21, 0x65, 0, (unsigned char *) tx_buffer, tx_length);
|
|
|
|
/* we got an error? */
|
|
if (r < 0)
|
|
@@ -1050,7 +1050,7 @@ RESPONSECODE CCID_Transmit(unsigned int
|
|
|
|
/* Xfr Block */
|
|
DEBUG_COMM2("chain parameter: %d", rx_length);
|
|
- r = ControlUSB(reader_index, 0x21, 0x65, rx_length << 8, tx_buffer,
|
|
+ r = ControlUSB(reader_index, 0x21, 0x65, rx_length << 8, (unsigned char *) tx_buffer,
|
|
tx_length);
|
|
|
|
/* we got an error? */
|
|
@@ -1175,7 +1175,7 @@ time_request_ICCD_B:
|
|
|
|
case 0x40:
|
|
/* Status Information */
|
|
- ccid_error(rx_buffer[2], __FILE__, __LINE__, __FUNCTION__);
|
|
+ ccid_error(rx_buffer[2], __FILE__, __LINE__, (const char *) __FUNCTION__);
|
|
return IFD_COMMUNICATION_ERROR;
|
|
|
|
case 0x80:
|
|
@@ -1233,7 +1233,7 @@ time_request:
|
|
|
|
if (cmd[STATUS_OFFSET] & CCID_COMMAND_FAILED)
|
|
{
|
|
- ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__); /* bError */
|
|
+ ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__); /* bError */
|
|
switch (cmd[ERROR_OFFSET])
|
|
{
|
|
case 0xEF: /* cancel */
|
|
@@ -1966,7 +1966,7 @@ RESPONSECODE SetParameters(unsigned int
|
|
|
|
if (cmd[STATUS_OFFSET] & CCID_COMMAND_FAILED)
|
|
{
|
|
- ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__); /* bError */
|
|
+ ccid_error(cmd[ERROR_OFFSET], __FILE__, __LINE__, (const char *) __FUNCTION__); /* bError */
|
|
if (0x00 == cmd[ERROR_OFFSET]) /* command not supported */
|
|
return IFD_NOT_SUPPORTED;
|
|
else
|