Commit fab619ad388c3257122ced598580fb4b3042fb85

Con Kolivas 2012-06-26T05:40:22

Merge pull request #238 from kanoi/master fpgautils.c include a debug message for all unknown open errors

diff --git a/fpgautils.c b/fpgautils.c
index 79da854..12e3847 100644
--- a/fpgautils.c
+++ b/fpgautils.c
@@ -159,6 +159,7 @@ serial_open(const char*devpath, unsigned long baud, signed short timeout, bool p
 			applog(LOG_ERR, "%s is already in use by another process", devpath);
 			break;
 		default:
+			applog(LOG_DEBUG, "Open %s failed, GetLastError:%u", devpath, e);
 			break;
 		}
 		return -1;
@@ -196,6 +197,9 @@ serial_open(const char*devpath, unsigned long baud, signed short timeout, bool p
 	{
 		if (errno == EACCES)
 			applog(LOG_ERR, "Do not have user privileges required to open %s", devpath);
+		else
+			applog(LOG_DEBUG, "Open %s failed, errno:%d", devpath, errno);
+
 		return -1;
 	}