diff --git a/refclock_pps.c b/refclock_pps.c index 6f0565e..f72e80f 100644 --- a/refclock_pps.c +++ b/refclock_pps.c @@ -59,24 +59,24 @@ static int pps_initialise(RCL_Instance instance) { fd = open(path, O_RDWR); if (fd < 0) { - LOG_FATAL("open() failed on %s", path); + LOG_FATAL("Could not open %s : %s", path, strerror(errno)); return 0; } UTI_FdSetCloexec(fd); if (time_pps_create(fd, &handle) < 0) { - LOG_FATAL("time_pps_create() failed on %s", path); + LOG_FATAL("time_pps_create() failed on %s : %s", path, strerror(errno)); return 0; } if (time_pps_getcap(handle, &mode) < 0) { - LOG_FATAL("time_pps_getcap() failed on %s", path); + LOG_FATAL("time_pps_getcap() failed on %s : %s", path, strerror(errno)); return 0; } if (time_pps_getparams(handle, ¶ms) < 0) { - LOG_FATAL("time_pps_getparams() failed on %s", path); + LOG_FATAL("time_pps_getparams() failed on %s : %s", path, strerror(errno)); return 0; } @@ -97,7 +97,7 @@ static int pps_initialise(RCL_Instance instance) { } if (time_pps_setparams(handle, ¶ms) < 0) { - LOG_FATAL("time_pps_setparams() failed on %s", path); + LOG_FATAL("time_pps_setparams() failed on %s : %s", path, strerror(errno)); return 0; } diff --git a/refclock_shm.c b/refclock_shm.c index 7cced1d..e8f6256 100644 --- a/refclock_shm.c +++ b/refclock_shm.c @@ -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; } diff --git a/refclock_sock.c b/refclock_sock.c index 4e8f2b2..176310c 100644 --- a/refclock_sock.c +++ b/refclock_sock.c @@ -105,7 +105,7 @@ static int sock_initialise(RCL_Instance instance) s.sun_family = AF_UNIX; if (snprintf(s.sun_path, sizeof (s.sun_path), "%s", path) >= sizeof (s.sun_path)) { - LOG_FATAL("path %s is too long", path); + LOG_FATAL("Path %s too long", path); return 0; } @@ -119,7 +119,7 @@ static int sock_initialise(RCL_Instance instance) unlink(path); if (bind(sockfd, (struct sockaddr *)&s, sizeof (s)) < 0) { - LOG_FATAL("bind() failed"); + LOG_FATAL("bind(%s) failed : %s", path, strerror(errno)); return 0; }