differ message printed when local clock is best master

Make the log output a bit more clear by changing how we inform the user
when the local clock is the best master clock. This allows easier
parsing of the log and identifying when the local clock is being
selected as the best clock.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
master
Jacob Keller 2018-03-15 13:31:38 -07:00 committed by Richard Cochran
parent c4e5879233
commit 862724fda5
1 changed files with 7 additions and 2 deletions

View File

@ -1709,8 +1709,13 @@ static void handle_state_decision_event(struct clock *c)
best_id = c->dds.clockIdentity; best_id = c->dds.clockIdentity;
} }
if (cid_eq(&best_id, &c->dds.clockIdentity)) {
pr_notice("selected local clock %s as best master",
cid2str(&best_id));
} else {
pr_notice("selected best master clock %s", pr_notice("selected best master clock %s",
cid2str(&best_id)); cid2str(&best_id));
}
if (!cid_eq(&best_id, &c->best_id)) { if (!cid_eq(&best_id, &c->best_id)) {
clock_freq_est_reset(c); clock_freq_est_reset(c);