[Pcsclite-cvs-commit] r2728 - /trunk/PCSC/src/winscard_clnt.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Fri Jan 11 09:59:12 UTC 2008


Author: rousseau
Date: Fri Jan 11 09:59:12 2008
New Revision: 2728

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=2728
Log:
SCardEstablishContextTH(): also display the system error message if a
system call fails (can't open PCSCLITE_PUBSHM_FILE)

Modified:
    trunk/PCSC/src/winscard_clnt.c

Modified: trunk/PCSC/src/winscard_clnt.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_clnt.c?rev=2728&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Fri Jan 11 09:59:12 2008
@@ -379,8 +379,8 @@
 		mapAddr = SYS_OpenFile(PCSCLITE_PUBSHM_FILE, O_RDONLY, 0);
 		if (mapAddr < 0)
 		{
-			Log2(PCSC_LOG_CRITICAL, "Cannot open public shared file: %s",
-				PCSCLITE_PUBSHM_FILE);
+			Log3(PCSC_LOG_CRITICAL, "Cannot open public shared file %s: %s",
+				PCSCLITE_PUBSHM_FILE, strerror(errno));
 			return SCARD_E_NO_SERVICE;
 		}
 
@@ -401,7 +401,8 @@
 				mapAddr, (i * pageSize));
 			if (readerStates[i] == NULL)
 			{
-				Log1(PCSC_LOG_CRITICAL, "Cannot public memory map");
+				Log2(PCSC_LOG_CRITICAL, "Cannot public memory map: %s",
+					strerror(errno));
 				SYS_CloseFile(mapAddr);	/* Close the memory map file */
 				return SCARD_F_INTERNAL_ERROR;
 			}




More information about the Pcsclite-cvs-commit mailing list