mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:05:06 -05:00
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:
@@ -200,7 +200,8 @@ add_interface(CNF_HwTsInterface *conf_iface)
|
||||
req.ifr_data = (char *)&ts_config;
|
||||
|
||||
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
|
||||
allows only reading of the configuration and it was already configured
|
||||
|
||||
Reference in New Issue
Block a user