@ -157,7 +158,20 @@ serial_open(const char*devpath, unsigned long baud, signed short timeout, bool p
@@ -157,7 +158,20 @@ serial_open(const char*devpath, unsigned long baud, signed short timeout, bool p
applog(LOG_ERR,"Do not have user privileges required to open %s",devpath);
break;
caseERROR_SHARING_VIOLATION:
applog(LOG_ERR,"%s is already in use by another process",devpath);
break;
default:
break;
}
return-1;
}
// thanks to af_newbie for pointers about this
COMMCONFIGcomCfg={0};
@ -188,7 +202,11 @@ serial_open(const char*devpath, unsigned long baud, signed short timeout, bool p
@@ -188,7 +202,11 @@ serial_open(const char*devpath, unsigned long baud, signed short timeout, bool p
intfdDev=open(devpath,O_RDWR|O_CLOEXEC|O_NOCTTY);
if(unlikely(fdDev==-1))
{
if(errno==EACCES)
applog(LOG_ERR,"Do not have user privileges required to open %s",devpath);