[Git][NTPsec/ntpsec][master] repair ntpd version printout
Hal Murray
gitlab at mg.gitlab.com
Mon Dec 19 11:40:25 UTC 2016
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
f86794bd by Hal Murray at 2016-12-19T03:39:44-08:00
repair ntpd version printout
exit after printing version
include time
- - - - -
1 changed file:
- ntpd/ntpd.c
Changes:
=====================================
ntpd/ntpd.c
=====================================
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -232,7 +232,7 @@ parse_cmdline_opts(
)
{
static bool parsed = false;
- int sawV = 0;
+ bool sawV = false;
if (parsed)
return;
@@ -378,6 +378,7 @@ parse_cmdline_opts(
}
break;
case 'V':
+ sawV = true;
printf("%s\n", ntpd_version());
break;
case 'w':
@@ -417,7 +418,7 @@ parse_cmdline_opts(
cmdline_servers = argv + ntp_optind;
}
- if (sawV > 0)
+ if (sawV)
exit(0);
}
@@ -491,7 +492,7 @@ const char *ntpd_version(void)
{
static char versionbuf[32];
snprintf(versionbuf, sizeof(versionbuf),
- "%s-%s-%d", VCS_BASENAME, VERSION, VCS_TICK);
+ "%s-%s-%d %s", VCS_BASENAME, VERSION, VCS_TICK, VCS_DATE);
return versionbuf;
}
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/f86794bdd5d9c29117758ef639cb3aab1e6e8826
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20161219/d5cbc466/attachment.html>
More information about the vc
mailing list