cvs commit: src/contrib/ntp - Imported sources

Ollivier Robert roberto at keltia.freenix.fr
Tue Aug 3 00:41:32 PDT 2004


According to David O'Brien:
> Are you willing to work with D.Mills to add an "quiet" flag to ntpdate?
> Our boot is now much more verbose with things like:

Hmm, last time I checked the ntp-hackers list, ntpdate was supposed to be
deprecated (replaced by ntpd -q) although many people complained ntpd was
much slower to synchronise and thus ntpdate was still maintained.

ntpdate.html has the death warrant:

   Disclaimer: The functionality of this program is now available in the
   ntpd program. See the -q command line option in the ntpd - Network
   Time Protocol (NTP) daemon page. After a suitable period of mourning,
   the ntpdate program is to be retired from this distribution

So I doubt it would be accepted. 

I'll send a patch to bugzilla.ntp.org anyway.  They mix stdout/stderr
output which is bad but I won't fix that.


--- ntpdate.c.old	Tue Jul 20 17:01:41 2004
+++ ntpdate.c	Tue Aug  3 09:34:44 2004
@@ -1339,7 +1339,8 @@
         hints.ai_family = ai_fam_templ;
         hints.ai_socktype = SOCK_DGRAM;
 
-        printf("Looking for host %s and service %s\n", serv, service);
+        if (verbose)
+        	printf("Looking for host %s and service %s\n", serv, service);
 
         error = getaddrinfo(serv, service, &hints, &addrResult);
         if (error != 0) {
@@ -1348,7 +1349,8 @@
 		return;
 	}
         else {
-                fprintf(stderr, "host found : %s\n", stohost((struct sockaddr_storage*)addrResult->ai_addr));
+                if (verbose)
+                        fprintf(stderr, "host found : %s\n", stohost((struct sockaddr_storage*)addrResult->ai_addr));
         }
 
 	server = (struct server *)emalloc(sizeof(struct server));
-- 
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto at keltia.freenix.fr
Darwin snuadh.freenix.org Kernel Version 7.4.0: Wed May 12 16:58:24 PDT 2004


More information about the cvs-src mailing list