Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src
Module Name: src
Committed By: kre
Date: Tue Oct 30 19:41:21 UTC 2018
Modified Files:
src/sbin/sysctl: sysctl.c
src/share/man/man7: sysctl.7
Log Message:
kern.boottime was changed from a struct timeval to a struct timespec
in January 2009 (the Christos' time merge, when time_t went to 64 bits).
sysctl needs to catch up. (So do other progs, which will happen, eventually,
but most of them are unaffected in any practical way.)
If you are running a system (NetBSD 6 or later) without this change, try
sysctl -nn kern.boottime
and marvel at the result (in theory, seconds.microseconds) most
probably being something like:
jinx$ sysctl -nn kern.boottime
1540801874.999995564
(There is a 1 in 1000 chance your system will have booted
in the interval [0 , 999999] nanoseconds after some second,
in which case this will not be observed. You should get
(almost) the same value after this change - just now it is as
it should be (there should now always be 9 digits after the '.').
On the other hand, if you're on a big-endian 64 bit host (running
64 bit sysctl) you would have always seen 0 for the microseconds field.
That should be fixed by this.
In sysctl(7) also document what we mean by "the time the system booted".
XXX Pullup -8
XXX Pullup -7
XXX Pullup -6 (oops, missed that one...)
To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sbin/sysctl/sysctl.c
cvs rdiff -u -r1.133 -r1.134 src/share/man/man7/sysctl.7
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index