Ignore NXIO error otherwise this causes spam if network is empty or refclk not
selected yet, and syncing refclk time to master.
This commit is contained in:
parent
0aaf68055e
commit
8b034e4aa6
11
lib/master.c
11
lib/master.c
|
|
@ -715,11 +715,16 @@ int ecrt_master_reference_clock_time(ec_master_t *master, uint32_t *time)
|
|||
|
||||
ret = ioctl(master->fd, EC_IOCTL_REF_CLOCK_TIME, time);
|
||||
if (EC_IOCTL_IS_ERROR(ret)) {
|
||||
fprintf(stderr, "Failed to get reference clock time: %s\n",
|
||||
strerror(EC_IOCTL_ERRNO(ret)));
|
||||
ret = EC_IOCTL_ERRNO(ret);
|
||||
if (ret != EIO && ret != ENXIO) {
|
||||
// do not log if no refclk or no refclk time yet
|
||||
fprintf(stderr, "Failed to get reference clock time: %s\n",
|
||||
strerror(ret));
|
||||
}
|
||||
return -ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
|
|
|||
Loading…
Reference in New Issue