Browse Source

shorten output; ok henning phessler

OPENBSD_5_5
deraadt 11 years ago
parent
commit
cfa24d6ccc
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      src/usr.sbin/ntpd/ntpd.c

+ 5
- 5
src/usr.sbin/ntpd/ntpd.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntpd.c,v 1.71 2013/10/04 20:30:38 schwarze Exp $ */
/* $OpenBSD: ntpd.c,v 1.72 2013/10/09 12:34:12 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -677,20 +677,20 @@ show_status_msg(struct imsg *imsg)
cstatus = (struct ctl_show_status *)imsg->data;
if (cstatus->peercnt > 0)
printf("%d of %d peers valid\n",
printf("%d/%d peers valid, ",
cstatus->valid_peers, cstatus->peercnt);
if (cstatus->sensorcnt > 0)
printf("%d of %d sensors valid\n",
printf("%d/%d sensors valid, ",
cstatus->valid_sensors, cstatus->sensorcnt);
if (cstatus->peercnt + cstatus->sensorcnt == 0)
printf("no peers and no sensors configured\n");
if (cstatus->synced == 1)
printf("clock is synced, stratum %u\n", cstatus->stratum);
printf("clock synced, stratum %u\n", cstatus->stratum);
else {
printf("clock is unsynced");
printf("clock unsynced");
clock_offset = cstatus->clock_offset < 0 ?
-1.0 * cstatus->clock_offset : cstatus->clock_offset;
if (clock_offset > 5e-7)


Loading…
Cancel
Save