From c8fcf5ac653698c924cbc9736d40dfb247c65f0e Mon Sep 17 00:00:00 2001 From: Kano Date: Tue, 26 Jun 2012 20:45:59 +1000 Subject: [PATCH] fpgautils.c include a debug message for all unknown open errors --- fpgautils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fpgautils.c b/fpgautils.c index 79da8541..12e3847d 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; }