refclock: improve error messages

This commit is contained in:
Miroslav Lichvar
2018-08-09 13:56:56 +02:00
parent afff06c88c
commit eea343b93f
3 changed files with 9 additions and 9 deletions

View File

@@ -69,13 +69,13 @@ static int shm_initialise(RCL_Instance instance) {
id = shmget(SHMKEY + param, sizeof (struct shmTime), IPC_CREAT | perm);
if (id == -1) {
LOG_FATAL("shmget() failed");
LOG_FATAL("shmget() failed : %s", strerror(errno));
return 0;
}
shm = (struct shmTime *)shmat(id, 0, 0);
if ((long)shm == -1) {
LOG_FATAL("shmat() failed");
LOG_FATAL("shmat() failed : %s", strerror(errno));
return 0;
}