From owner-freebsd-hackers Sun Jun 8 09:12:35 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA18250 for hackers-outgoing; Sun, 8 Jun 1997 09:12:35 -0700 (PDT) Received: from zibbi.mikom.csir.co.za (zibbi.mikom.csir.co.za [146.64.24.58]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA18245 for ; Sun, 8 Jun 1997 09:12:29 -0700 (PDT) Received: (from jhay@localhost) by zibbi.mikom.csir.co.za (8.8.5/8.8.5) id SAA12095 for hackers@FreeBSD.ORG; Sun, 8 Jun 1997 18:12:26 +0200 (SAT) From: John Hay Message-Id: <199706081612.SAA12095@zibbi.mikom.csir.co.za> Subject: Proposed change to struct clockinfo To: hackers@FreeBSD.ORG (FreeBSD-hackers) Date: Sun, 8 Jun 1997 18:12:26 +0200 (SAT) X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hi, I have tried to compile the latest version of xntpd (3-5.90.1) on FreeBSD, but the compile breaks because it assume that the clockinfo structure have an element tickadj. Both NetBSD and OpenBSD have it. I would like to add it to our source also, but want to hear if there is any complaints, or something that I have missed. Four files have to change: sys/sys/time.h sys/kern/kern_clock.c lib/libc/gen/sysctl.3 usr.sbin/sysctl/sysctl.c As far as I can tell only 4 other files use the clockinfo structure and they will work again after a recompile. They are: lib/libc/gmon/gmon.c usr.bin/time/time.c usr.sbin/kgmon/kgmon.c libexec/rpc.rstatd/rstat_proc.c I would also like to put these in the 2.2 tree after a few days. If I don't hear anything in the next few days, I will assume it means yes. :-) John -- John Hay -- John.Hay@mikom.csir.co.za --- sys/sys/time.h.org Tue May 13 18:38:11 1997 +++ sys/sys/time.h Sun Jun 8 17:34:22 1997 @@ -125,6 +125,7 @@ struct clockinfo { int hz; /* clock frequency */ int tick; /* micro-seconds per hz tick */ + int tickadj; /* clock skew rate for adjtime() */ int stathz; /* statistics clock frequency */ int profhz; /* profiling clock frequency */ }; --- sys/kern/kern_clock.c.org Sun Jun 8 17:31:24 1997 +++ sys/kern/kern_clock.c Sun Jun 8 17:32:43 1997 @@ -1048,6 +1048,7 @@ */ clkinfo.hz = hz; clkinfo.tick = tick; + clkinfo.tickadj = tickadj; clkinfo.profhz = profhz; clkinfo.stathz = stathz ? stathz : hz; return (sysctl_handle_opaque(oidp, &clkinfo, sizeof clkinfo, req)); --- lib/libc/gen/sysctl.3.org Sat Mar 15 16:52:46 1997 +++ lib/libc/gen/sysctl.3 Sun Jun 8 17:37:30 1997 @@ -294,7 +294,7 @@ .Va struct clockinfo structure is returned. This structure contains the clock, statistics clock and profiling clock -frequencies, and the number of micro-seconds per hz tick. +frequencies, the number of micro-seconds per hz tick and the slew rate. .It Li KERN_FILE Return the entire file table. The returned data consists of a single --- usr.sbin/sysctl/sysctl.c.org Fri Apr 4 18:42:54 1997 +++ usr.sbin/sysctl/sysctl.c Sun Jun 8 17:39:48 1997 @@ -222,8 +222,8 @@ struct clockinfo *ci = (struct clockinfo*)p; if (l2 != sizeof *ci) err(-1, "S_clockinfo %d != %d", l2, sizeof *ci); - printf("{ hz = %d, tick = %d, profhz = %d, stathz = %d }", - ci->hz, ci->tick, ci->profhz, ci->stathz); + printf("{ hz = %d, tick = %d, tickadj = %d, profhz = %d, stathz = %d }", + ci->hz, ci->tick, ci->tickadj, ci->profhz, ci->stathz); return (0); }