In case of error, return errno, instead of 1.
In case of error, return errno, instead of 1.

Suggested by:	delphij
Reviewed by:	delphij
Approved by:	grehan (mentor)

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase