Joerg Sonnenberger [Wed, 27 Apr 2005 11:26:18 +0000 (11:26 +0000)]
Mark name as const char *, not char *.
Matthew Dillon [Wed, 27 Apr 2005 00:59:51 +0000 (00:59 +0000)]
Clean up the manual page, correct spelling, add additional information.
Matthew Dillon [Wed, 27 Apr 2005 00:42:13 +0000 (00:42 +0000)]
Add a manual page, clean up the options display, and link dntpd into the
build.
Matthew Dillon [Tue, 26 Apr 2005 23:50:23 +0000 (23:50 +0000)]
Implement -s/-S (do quick course adjustment on startup).
Matthew Dillon [Tue, 26 Apr 2005 22:35:32 +0000 (22:35 +0000)]
Correct a bug in the last two commits. The time_second global was not
being properly updated after the re-org, causing various weirdness to occur
in the system (such as ARP not retrying after a failure).
Sascha Wildner [Tue, 26 Apr 2005 21:23:50 +0000 (21:23 +0000)]
Remove unused clear() function from the console renderer interface.
Joerg Sonnenberger [Tue, 26 Apr 2005 18:53:17 +0000 (18:53 +0000)]
const correctness
Joerg Sonnenberger [Tue, 26 Apr 2005 18:51:44 +0000 (18:51 +0000)]
const / sign correctnes
Joerg Sonnenberger [Tue, 26 Apr 2005 17:56:43 +0000 (17:56 +0000)]
Remove unionfs hack. DTF_NODUP is now a NOP.
Go-on: dillon
Simon Schubert [Tue, 26 Apr 2005 16:59:59 +0000 (16:59 +0000)]
Fix ICMP problems in rc.firewall:
When your trusted_net, like in the default config, was a net that
is not routed then even the allowed ICMP types were dropped.
Install rc.firewall mode +x.
Submitted-by: Andreas Hauser <andy@splashground.de>
Joerg Sonnenberger [Tue, 26 Apr 2005 16:59:56 +0000 (16:59 +0000)]
Remove dead code. Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 16:58:23 +0000 (16:58 +0000)]
Correct types for devname[_r].
Joerg Sonnenberger [Tue, 26 Apr 2005 15:57:39 +0000 (15:57 +0000)]
ANSIfy, no (void) before functions, include stdlib.h for prototype.
Joerg Sonnenberger [Tue, 26 Apr 2005 15:54:03 +0000 (15:54 +0000)]
It's dead, Jim.
Stopping faking DES, it doesn't make the world better.
Joerg Sonnenberger [Tue, 26 Apr 2005 15:04:59 +0000 (15:04 +0000)]
Remove useless void * before free. Remove local prototype of
_reclaim_telldir. No need to include sys/types.h.
Joerg Sonnenberger [Tue, 26 Apr 2005 14:27:13 +0000 (14:27 +0000)]
Always use strlcpy, in the last case also check the return value to
detect truncation.
Joerg Sonnenberger [Tue, 26 Apr 2005 14:21:22 +0000 (14:21 +0000)]
Fix warning.
Joerg Sonnenberger [Tue, 26 Apr 2005 14:13:50 +0000 (14:13 +0000)]
Explicitly initialize e. The code flow looks safe, but having
two interwoven goto flows mixed makes it a bit hard to be sure.
Joerg Sonnenberger [Tue, 26 Apr 2005 14:03:57 +0000 (14:03 +0000)]
Work around restrict.
Joerg Sonnenberger [Tue, 26 Apr 2005 10:41:57 +0000 (10:41 +0000)]
Correct and improve __diagassert.
Joerg Sonnenberger [Tue, 26 Apr 2005 10:26:41 +0000 (10:26 +0000)]
Fix warnings. Use sysctlbyname.
Joerg Sonnenberger [Tue, 26 Apr 2005 10:25:55 +0000 (10:25 +0000)]
Add prototype for __creat.
Max Okumoto [Tue, 26 Apr 2005 10:22:28 +0000 (10:22 +0000)]
Create ProcWait(), like ProcExec() this is a wraper for wait().
Max Okumoto [Tue, 26 Apr 2005 10:22:09 +0000 (10:22 +0000)]
Set close-on-exec on output side of pipe.
Max Okumoto [Tue, 26 Apr 2005 10:21:48 +0000 (10:21 +0000)]
inline shellneed()
Max Okumoto [Tue, 26 Apr 2005 10:21:24 +0000 (10:21 +0000)]
Allocate space for arguments, and free them after vfork().
Max Okumoto [Tue, 26 Apr 2005 10:20:39 +0000 (10:20 +0000)]
Move initilization of ProcStuff before vfork().
Max Okumoto [Tue, 26 Apr 2005 10:20:20 +0000 (10:20 +0000)]
Pass argv using ProcStuff.
Max Okumoto [Tue, 26 Apr 2005 10:19:55 +0000 (10:19 +0000)]
Doc struct ProStuff fields.
Max Okumoto [Tue, 26 Apr 2005 10:19:07 +0000 (10:19 +0000)]
Move redirection of stderr into ProcExec().
Joerg Sonnenberger [Tue, 26 Apr 2005 10:16:16 +0000 (10:16 +0000)]
Change arc4random_addrandom to pass the more natural uint8_t * and
size_t as arguments. ANSIfy.
Joerg Sonnenberger [Tue, 26 Apr 2005 10:08:41 +0000 (10:08 +0000)]
Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 10:05:08 +0000 (10:05 +0000)]
Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 09:42:56 +0000 (09:42 +0000)]
Really include patches, don't let them catch dust.
Noticed-by: Mitja Horvat <Mitja.Horvat@klub-ksok.si>
Joerg Sonnenberger [Tue, 26 Apr 2005 09:40:58 +0000 (09:40 +0000)]
Fix warnings. Use sysctlbyname.
Joerg Sonnenberger [Tue, 26 Apr 2005 09:26:07 +0000 (09:26 +0000)]
Include guard.
Joerg Sonnenberger [Tue, 26 Apr 2005 09:08:38 +0000 (09:08 +0000)]
Include sys/types.h to get uid_t and gid_t.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:54:59 +0000 (08:54 +0000)]
Ensure that the directory fits into memory. Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:48:19 +0000 (08:48 +0000)]
ANSIfy. Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:46:54 +0000 (08:46 +0000)]
Use namespace mangler.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:45:19 +0000 (08:45 +0000)]
use uid_t / gid_t for prototype in stdlib.h, ANSIfy.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:41:44 +0000 (08:41 +0000)]
Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:37:24 +0000 (08:37 +0000)]
vfork can clobber the local stack frame, use fork(). We might also
want to remove the support for '+'. Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:29:52 +0000 (08:29 +0000)]
Fix warning.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:27:44 +0000 (08:27 +0000)]
Fix warnings, ANSIfy.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:21:34 +0000 (08:21 +0000)]
ANSIfy. Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:07:58 +0000 (08:07 +0000)]
Fix warnings. Sprinkle const. Use size_t in some places.
Matthew Dillon [Tue, 26 Apr 2005 07:01:43 +0000 (07:01 +0000)]
Do not try to collect offset data if a prior offset correction is still
in progress. Since we do not compensate for the prior offset correction,
any corrections based on data accumulated while the prior correction is
active will overshoot or undershoot.
Offset calculations are based on compensated real time rather then
uncompensated real time, which is why this is a problem. Frequency
corrections are based on uncompensated real time and do not have any
similar issue. It would be even better, but more difficult, to adapt
the offset correction code to use uncompensated real time and then take
the compensation into account, but this is a considerably more complex
equation to get right.
There is still another problem and that is the offset error will continue
to build when the frequency is not corrected, potentially resulting in a
longer sync-up time. On the positive side, the offset correction is based
on a standard deviation that only requires a minimum of 4 samples.
Correct a minor compiler warning.
YONETANI Tomokazu [Tue, 26 Apr 2005 06:30:52 +0000 (06:30 +0000)]
yp_maplist is one of those undocumented functions, resurrect and prototype it.
Taken-from: FreeBSD include/rpcsvc/ypclnt.h,1.15
Joerg Sonnenberger [Tue, 26 Apr 2005 06:16:29 +0000 (06:16 +0000)]
Fix warnings, remove unused headers. Remove additional { }.
Joerg Sonnenberger [Tue, 26 Apr 2005 06:08:42 +0000 (06:08 +0000)]
Remove more __NETBSD_SYSCALLS.
Joerg Sonnenberger [Tue, 26 Apr 2005 06:04:56 +0000 (06:04 +0000)]
Remove compat junk, __getcwd always exists on DragonFly.
Joerg Sonnenberger [Tue, 26 Apr 2005 05:51:00 +0000 (05:51 +0000)]
Unconditionalize HAS_UTRACE, we never have NetBSD syscalls.
Joerg Sonnenberger [Tue, 26 Apr 2005 05:48:21 +0000 (05:48 +0000)]
Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 05:30:12 +0000 (05:30 +0000)]
Readd ypresp_allfn, now correctly typed.
Noticed-by: yonetani
Matthew Dillon [Tue, 26 Apr 2005 00:56:54 +0000 (00:56 +0000)]
Add -n (not for real) option. The program goes through motions, but
doesn't actually update the system time. Plus a few other cleanups.
Everything now works except -s/-S and leap second correction.
Matthew Dillon [Tue, 26 Apr 2005 00:47:59 +0000 (00:47 +0000)]
On MP systems, malloc's using R_NOWAIT are not supposed to block, so don't
let them block on the BGL either.
Matthew Dillon [Tue, 26 Apr 2005 00:31:05 +0000 (00:31 +0000)]
Minor rearrangement of an mpcount. This isn't actually a bug because the
code is safely in a critical section, but mpcount still ought not be
bumped until we actually intend to get the MP lock.
Matthew Dillon [Tue, 26 Apr 2005 00:30:00 +0000 (00:30 +0000)]
Fix an SMP bug. The SMP startup code waits for the APs to finish
initializing and goes through an interlock with the BGL. Unfortunately,
it does not properly restore the BGL when it finishes. This can cause
the system to lock-up on boot (spin trying to get a broken BGL) just
after finishing the AP initialization. Additionally, this resulted in the
swapper thread running without the BGL.
Matthew Dillon [Mon, 25 Apr 2005 22:26:22 +0000 (22:26 +0000)]
Redo the way the thread priority is displayed. Split out the critical
section count from the priority field and also display the MP lock count
for each thread.
Matthew Dillon [Mon, 25 Apr 2005 20:50:59 +0000 (20:50 +0000)]
Add config file support, daemon() backgrounding, pidfile,
auto-kill-old-daemon on program restart, plus some cleanups.
Matthew Dillon [Mon, 25 Apr 2005 20:22:27 +0000 (20:22 +0000)]
Make the trace code a bit smarter. It now looks around for something
that might be a frame pointer if the stack pointer given to it does
not appear to point at a frame.
Matthew Dillon [Mon, 25 Apr 2005 20:05:09 +0000 (20:05 +0000)]
Add information on interrupt preemptions by the current thread on any given
cpu, and in the thread list, so we can see what is preempting what.
Joerg Sonnenberger [Mon, 25 Apr 2005 19:36:57 +0000 (19:36 +0000)]
const correctness
Joerg Sonnenberger [Mon, 25 Apr 2005 19:03:46 +0000 (19:03 +0000)]
Fix warnings, ANSIfy, constify.
Joerg Sonnenberger [Mon, 25 Apr 2005 18:52:28 +0000 (18:52 +0000)]
First stab at WARNS=6 cleaning. More will be done once I figure out
how to teach rpcgen const.
Joerg Sonnenberger [Mon, 25 Apr 2005 18:19:48 +0000 (18:19 +0000)]
Ansify getcwd and declare the syscall prototype.
Matthew Dillon [Mon, 25 Apr 2005 17:42:49 +0000 (17:42 +0000)]
Implement a course offset adjustment for large time steps.
Rework the logging code. Add four logging levels (default 1, which logs
any corrections > 10 ppm made).
Log to syslog when not in debug mode.
Sascha Wildner [Mon, 25 Apr 2005 17:33:26 +0000 (17:33 +0000)]
Remove inactive code for the maclabel parameter. DragonFly doesn't support
Mandatory Access Control currently.
Liam J. Foy [Mon, 25 Apr 2005 16:10:25 +0000 (16:10 +0000)]
- ANSI
- WARNS 6
Submitted by: Peter Avalos <pavalos@theshell.com>
Joerg Sonnenberger [Mon, 25 Apr 2005 15:14:54 +0000 (15:14 +0000)]
CISS quirk.
Obtained-from: FreeBSD
Hiten Pandya [Mon, 25 Apr 2005 14:27:03 +0000 (14:27 +0000)]
Be consistent for preventing redundant header inclusion.
Joerg Sonnenberger [Mon, 25 Apr 2005 08:33:25 +0000 (08:33 +0000)]
ANSIfy.
Joerg Sonnenberger [Mon, 25 Apr 2005 08:25:23 +0000 (08:25 +0000)]
ANSIfy and fix function casts.
Joerg Sonnenberger [Mon, 25 Apr 2005 07:05:55 +0000 (07:05 +0000)]
Properly create and destroy the DMA maps.
Max Okumoto [Mon, 25 Apr 2005 05:52:18 +0000 (05:52 +0000)]
Removed duplicate static variable, created when I merged compat.c and job.c
Matthew Dillon [Mon, 25 Apr 2005 02:28:47 +0000 (02:28 +0000)]
Don't issue a frequency correction if it is the same as the last
frequency correction.
Matthew Dillon [Sun, 24 Apr 2005 23:09:32 +0000 (23:09 +0000)]
Implement a variable polling rate capability.
Implement a polling state which runs through a fast-startup to get a rough
offset correction, a medium-polled acquisition mode to get a rough
frequency correction, and a long-polled maintainance mode (assuming the
time source is good enough) to get a fine frequency correction.
startup mode: 6 five-second polls
acquisition mode: 16 five-minute polls
maintainance mode: 30 minute polls (if the correllation is good enough)
Implement a short failure mode (3 failed polls in a row) which returns
to an aquisition state on recovery, and a long failure mode (10 failed polls
in a row) which returns to a startup state on recovery.
When resetting a regression, also remove any alternate regression further
on down the alt chain (since they won't be staggered any more).
Sascha Wildner [Sun, 24 Apr 2005 20:20:57 +0000 (20:20 +0000)]
Comment out description of the maclabel parameter.
Liam J. Foy [Sun, 24 Apr 2005 15:31:30 +0000 (15:31 +0000)]
- ANSI
- WARNS 6
Submitted by: Peter Avalos <pavalos@theshell.com>
Liam J. Foy [Sun, 24 Apr 2005 14:36:55 +0000 (14:36 +0000)]
- Add further functionality to check for invalid characters
- Remove keyword 'continue' for more indepth error reporting
on each line
- WARNS 6 Clean
No objections: kernel@
Max Okumoto [Sun, 24 Apr 2005 12:44:50 +0000 (12:44 +0000)]
Move redirection of stdin into ProcExec().
Max Okumoto [Sun, 24 Apr 2005 12:44:08 +0000 (12:44 +0000)]
Move redirection of stdout into ProcExec().
Max Okumoto [Sun, 24 Apr 2005 12:43:43 +0000 (12:43 +0000)]
Moved manupulation of close-on-exec flags on std{in,out,err} into
ProcExec(). The old code was broken in that it cleared all the
flags, not just close-on-exec.
Max Okumoto [Sun, 24 Apr 2005 12:43:09 +0000 (12:43 +0000)]
Use a temp variable to move dups2() out of conditional.
Max Okumoto [Sun, 24 Apr 2005 12:42:38 +0000 (12:42 +0000)]
Move clearing of close-on-exec of both stdin, stdout together.
Max Okumoto [Sun, 24 Apr 2005 12:42:22 +0000 (12:42 +0000)]
Moved execvp() into ProcExec().
Max Okumoto [Sun, 24 Apr 2005 12:41:54 +0000 (12:41 +0000)]
Move redirection of stderr into ProcExec().
Max Okumoto [Sun, 24 Apr 2005 12:41:08 +0000 (12:41 +0000)]
Move common exec code into a ProcExec().
Max Okumoto [Sun, 24 Apr 2005 12:40:23 +0000 (12:40 +0000)]
Move OP_* #defines out of make.h and into GNode.h were they belong.
Max Okumoto [Sun, 24 Apr 2005 12:39:45 +0000 (12:39 +0000)]
Copy string into temp variable to quiet warning.
Max Okumoto [Sun, 24 Apr 2005 12:39:17 +0000 (12:39 +0000)]
Move variable declarations out of globals.h into var.h
Max Okumoto [Sun, 24 Apr 2005 12:38:26 +0000 (12:38 +0000)]
Revert using execl(), it makes it difficult to extract common code.
Jeroen Ruigrok/asmodai [Sun, 24 Apr 2005 10:58:19 +0000 (10:58 +0000)]
Get rid off the wrappers around __va_copy(), they serve no real purpose.
Wrap va_copy() in __ISO_C_VISIBLE.
Jeroen Ruigrok/asmodai [Sun, 24 Apr 2005 09:56:31 +0000 (09:56 +0000)]
__pure__ is supported from 2.96 onward, not 3.0.
Jeroen Ruigrok/asmodai [Sun, 24 Apr 2005 09:41:27 +0000 (09:41 +0000)]
Synch our GNU_PREREQ() macro with FreeBSD:
explicitly exclude the Intel C compiler and make the layout a tad bit
better to read.
Matthew Dillon [Sun, 24 Apr 2005 09:39:27 +0000 (09:39 +0000)]
Change client_check() to calculate the best offset and the best frequency
correction separately.
The best offset correction now utilizes a standard deviation of the offset
error with a minimum of 4 samples. An offset correction occurs when the
standard deviation is less then 1/4 the average offset. When an offset
correction is made, the offset data is cleared (since it becomes invalid
once a correction is made). This calculation gives the code an almost
human perception of when the offset can be safely adjusted, regardless
of the 'mess' on the internet.
Change tv_delta_micro() into tv_delta_double() since most of the callers
were (previously) dividing the result by 1E6.
NOTE: the correllation for frequency correction is not working quite as
well as I had hoped, it's bouncing around a lot for internet ntp sources.
But the standard deviation on the offset appears to work very well.
Matthew Dillon [Sun, 24 Apr 2005 06:24:42 +0000 (06:24 +0000)]
Allows 16 samples with a correllation >= 0.96 in addition to the
pre-existing 8 samples with a correllation >= 0.99 to satisfy the
requirements for a correction to be issued to the system.
Matthew Dillon [Sun, 24 Apr 2005 06:23:56 +0000 (06:23 +0000)]
Fix an overflow in the delta time calculation. A double as incorrectly
converted to a long.
Matthew Dillon [Sun, 24 Apr 2005 05:04:28 +0000 (05:04 +0000)]
Cleanup compiler warnings. Generate cleaner debug output. Change the
default polling interval to 60 seconds.
Add a -T option to specify the polling interval. Enhance test mode (-t).