When ntp_gettime() was converted from a sysctl + wrapper to a system
call, its semantics were unintentionally changed. It went from returning the time state to returning 0 or -1. Since 0 means time normal, and non-zero effectively only shows up around leap seconds, this went unnoticed until now. At least unnoticed until someone was trying to run a binary they didn't have source for and it was misbehaving... Submitted by: Judah Levine MFC After: 2 weeks
This commit is contained in:
parent
7dcf45c07b
commit
fe18f3853e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165969
@ -268,6 +268,7 @@ ntp_gettime(struct thread *td, struct ntp_gettime_args *uap)
|
||||
ntp_gettime1(&ntv);
|
||||
mtx_unlock(&Giant);
|
||||
|
||||
td->td_retval[0] = ntv.time_state;
|
||||
return (copyout(&ntv, uap->ntvp, sizeof(ntv)));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user