summaryrefslogtreecommitdiff
path: root/node/Utils.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-03-27 18:23:02 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-03-27 18:23:02 -0700
commitb73c36acbf03431fd7fa3584e8621875fdcbebf4 (patch)
treea08a976e4d4a63efecc2892bc969cc60141b4c5f /node/Utils.cpp
parent181369964f501c3c702971b30c82b9e84eed58db (diff)
parentd2c5d7150253a5ae5613cac1d65e84b3aa5d33bc (diff)
downloadinfinitytier-b73c36acbf03431fd7fa3584e8621875fdcbebf4.tar.gz
infinitytier-b73c36acbf03431fd7fa3584e8621875fdcbebf4.zip
Merge branch 'adamierymenko-dev' of ssh://shub-niggurath.zerotier.com:222/git/ZeroTierOne into adamierymenko-dev
Diffstat (limited to 'node/Utils.cpp')
-rw-r--r--node/Utils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/node/Utils.cpp b/node/Utils.cpp
index fe153af2..95b66337 100644
--- a/node/Utils.cpp
+++ b/node/Utils.cpp
@@ -207,11 +207,11 @@ void Utils::getSecureRandom(void *buf,unsigned int bytes)
{
int fd = ::open("/dev/urandom",O_RDONLY);
if (fd < 0) {
- fprintf(stderr,"FATAL ERROR: unable to open /dev/urandom%s",ZT_EOL_S);
+ fprintf(stderr,"FATAL ERROR: unable to open /dev/urandom (%d)"ZT_EOL_S,errno);
exit(-1);
}
if ((int)::read(fd,randbuf,sizeof(randbuf)) != (int)sizeof(randbuf)) {
- fprintf(stderr,"FATAL ERROR: unable to read from /dev/urandom%s",ZT_EOL_S);
+ fprintf(stderr,"FATAL ERROR: unable to read from /dev/urandom"ZT_EOL_S);
exit(-1);
}
::close(fd);