ntp: log error when SIOCSHWTSTAMP fails with EPERM
Increase the severity of the log message to "error" when the SIOCSHWTSTAMP ioctl fails due missing the NET_ADMIN capability.
This commit is contained in:
parent
3177474ae8
commit
ddfaf2e542
1 changed files with 2 additions and 1 deletions
|
@ -200,7 +200,8 @@ add_interface(CNF_HwTsInterface *conf_iface)
|
||||||
req.ifr_data = (char *)&ts_config;
|
req.ifr_data = (char *)&ts_config;
|
||||||
|
|
||||||
if (ioctl(sock_fd, SIOCSHWTSTAMP, &req)) {
|
if (ioctl(sock_fd, SIOCSHWTSTAMP, &req)) {
|
||||||
DEBUG_LOG("ioctl(%s) failed : %s", "SIOCSHWTSTAMP", strerror(errno));
|
LOG(errno == EPERM ? LOGS_ERR : LOGS_DEBUG,
|
||||||
|
"ioctl(%s) failed : %s", "SIOCSHWTSTAMP", strerror(errno));
|
||||||
|
|
||||||
/* Check the current timestamping configuration in case this interface
|
/* Check the current timestamping configuration in case this interface
|
||||||
allows only reading of the configuration and it was already configured
|
allows only reading of the configuration and it was already configured
|
||||||
|
|
Loading…
Reference in a new issue