[Pcsclite-cvs-commit] PCSC/src configfile.l,1.11,1.12

rousseau@haydn.debian.org rousseau@haydn.debian.org


Update of /cvsroot/pcsclite/PCSC/src
In directory haydn:/tmp/cvs-serv14569

Modified Files:
	configfile.l 
Log Message:
add strerror(errno) in the error message.


Index: configfile.l
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/configfile.l,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- configfile.l	30 Mar 2004 14:48:28 -0000	1.11
+++ configfile.l	30 Mar 2004 14:54:19 -0000	1.12
@@ -40,6 +40,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <wintypes.h>
+#include <errno.h>
 
 #include "config.h"
 #include "pcsclite.h"
@@ -90,7 +91,8 @@
 				pcDevicename = strdup(pcCurrent);
 				if (SYS_Stat(pcDevicename, &fStatBuf) != 0)
 				{
-					DebugLogB("The device %s doesn't exist", pcDevicename);
+					DebugLogC("Error with device %s: %s",
+						pcDevicename, strerror(errno));
 					badError = 1;
 				}
 			}
@@ -109,7 +111,8 @@
 				pcLibpath = strdup(pcCurrent);
 				if (SYS_Stat(pcLibpath, &fStatBuf) != 0)
 				{
-					DebugLogB("The library %s doesn't exist", pcLibpath);
+					DebugLogC("Error with library %s: %s",
+						pcLibpath, strerror(errno));
 					badError = 1;
 				}
 			}
@@ -122,9 +125,7 @@
 		else if (strcmp(pcPrevious, "CHANNELID") == 0)
 		{
 			if (pcChannelid == NULL)
-			{
 				pcChannelid = strdup(pcCurrent);
-			}
 			else
 			{
 				tok_error(pcPrevious);