mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:45:07 -05:00
refclock_phc: support ethernet ifname as specifier
This commit allows the user to select a PHC refclock associated with an Ethernet interface by specifying the interface name. This allows the user to handle situations where multiple NICs are exposing PHC devices (or non-NIC PHC device files exist in the system) in a more streamline manner.
This commit is contained in:
committed by
Miroslav Lichvar
parent
81362fa201
commit
6e541afbe9
@@ -220,7 +220,7 @@ add_interface(CNF_HwTsInterface *conf_iface)
|
||||
|
||||
SCK_CloseSocket(sock_fd);
|
||||
|
||||
phc_fd = SYS_Linux_OpenPHC(NULL, ts_info.phc_index);
|
||||
phc_fd = SYS_Linux_OpenPHC(req.ifr_name);
|
||||
if (phc_fd < 0)
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user