pub fn verify_ptp_dev(
dev_path: impl AsRef<Path>,
ptp_major: Option<u32>,
) -> Result<bool, Error>Expand description
Returns true if the provided (absolute) path refers to a PTP clock device node (typically
under /dev/), or false otherwise.
By optionally providing the ptp_major, the verification is accelerated by skipping the
reading and processing of procfs(5) to figure out which major number has been assigned
to the PTP driver by the system.
ยงErrors
- If the provided
pathis not absolute. - If
stat(2)ing the providedpathfails. - If
procfs_find_ptp_majorfails.