History log of /freebsd-current/sbin/adjkerntz/adjkerntz.c
Revision Date Author Comments
# 0b8224d1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

Remove copyright strings ifdef'd out

We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 65f3be91 07-Jul-2023 Alfonso Gregory <gfunni234@gmail.com>

Mark usage function as __dead2 in programs where it does not return

In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 95144583 23-Jun-2022 Eugene Grosbein <eugen@FreeBSD.org>

adjkerntz(8): revert "detect extra jailed invokation to keep logs clean"

This reverts commit 048ce0876f5421f70a6d348479bdeacdd8472bed
due to bugs. Reworked change will be committed later hopefully.


# 048ce087 21-Jun-2022 Eugene Grosbein <eugen@FreeBSD.org>

adjkerntz(8): detect extra jailed invokation to keep logs clean

It may happen that "adjkerntz -a" called from jailed root crontab.
In that case it spams logs with a line:

sysctl(set: "machdep.wall_cmos_clock"): Operation not permitted

Be silent in that case.

MFC after: 1 month


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# a29cc9a3 28-Jul-2013 Andriy Gapon <avg@FreeBSD.org>

Revert r253748,253749

This WIP should not have been committed yet.

Pointyhat to: avg


# c722ec3a 28-Jul-2013 Andriy Gapon <avg@FreeBSD.org>

remove needless inclusion of machine/cpu.h in userland

MFC after: 21 days


# 902d9eaf 01-Sep-2012 Ed Schouten <ed@FreeBSD.org>

Rework all non-contributed files that use `struct timezone'.

This structure is not part of POSIX. According to POSIX, gettimeofday()
has the following prototype:

int gettimeofday(struct timeval *restrict tp, void *restrict tzp);

Also, POSIX states that gettimeofday() shall return 0 (as long as tzp is
not used). Remove dead error handling code. Also use NULL for a
nul-pointer instead of integer 0.

While there, change all pieces of code that only use tv_sec to use
time(3), as this provides less overhead.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# cc17b044 23-Oct-2006 Ruslan Ermilov <ru@FreeBSD.org>

If not compiled for debugging, redirect standard input/output/error
to /dev/null before becoming a daemon.


# 564084e4 13-May-2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Correct various mistakes in the last commit.


# bec1fa86 11-May-2006 Poul-Henning Kamp <phk@FreeBSD.org>

Use sysctlbyname


# d5ac36ed 27-Apr-2004 Guy Helmer <ghelmer@FreeBSD.org>

Invoke tzset(3) within the main loop to catch changes to /etc/localtime
when running as a daemon in the hope that it will fix situations
where the CMOS clock was apparently set using the stale TZ offset.


# c69284ca 03-May-2003 David E. O'Brien <obrien@FreeBSD.org>

Use __FBSDID() to quiet GCC 3.3 warnings.


# bbbc9735 17-Mar-2002 Warner Losh <imp@FreeBSD.org>

o Use real prototypes
o Remove __P.
o main(int, char *[])


# 086ad217 14-Jul-2001 Dima Dorfman <dd@FreeBSD.org>

Fix a prototype and set WARNS=2.

Submitted by: Mike Barcroft <mike@q9media.com>


# 7f3dea24 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# f9184dd7 04-Jun-1998 Philippe Charnier <charnier@FreeBSD.org>

Correct use of .Nm. Add missing .El. Add rcsid. Remove unused #include.


# 84436e33 11-Apr-1998 Andrey A. Chernov <ache@FreeBSD.org>

Implement Helbig idea of offset calculation reducing mktime() calls
Immediately exit if /etc/wall_cmos_clock not present


# 20344e15 30-Mar-1998 Andrey A. Chernov <ache@FreeBSD.org>

Add workaround suggestion for 'nonexistent time' diagnostic


# 57394688 25-Feb-1998 Andrey A. Chernov <ache@FreeBSD.org>

Minimize clock drift between getting and setting time
Submitted by: bde


# 4cabb4cd 10-Jun-1997 Philippe Charnier <charnier@FreeBSD.org>

Add Id, add usage function.


# 8d64695c 28-Mar-1997 Warner Losh <imp@FreeBSD.org>

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# 88d807a6 05-Apr-1996 Andrey A. Chernov <ache@FreeBSD.org>

Detect if /etc/wall_cmos_clock gone while adjkerntz paused.


# c6337b7b 05-Apr-1996 Andrey A. Chernov <ache@FreeBSD.org>

Dynamically sense /etc/wall_cmos_clock presence/absense


# 9243a8f3 04-Apr-1996 Andrey A. Chernov <ache@FreeBSD.org>

Fix error with multiply 'adjkerntz -a' copies running.
Manage adjkerntz kernel variable even for UTC clocks.
Code cleanup.


# 5ebc7e62 30-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# 73cab1a3 26-Mar-1995 Andrey A. Chernov <ache@FreeBSD.org>

Use more AI to predict initial/final isdst,
latest isdst preffered.


# 937b5aaa 26-Dec-1994 Andrey A. Chernov <ache@FreeBSD.org>

Use timelocal() instead of mktime() hack


# 882588f8 11-Dec-1994 Andrey A. Chernov <ache@FreeBSD.org>

Fix resetting adjkerntz to 0 (pointed by Bruce),
forget to initialize mib variable.


# 40839902 11-Dec-1994 Andrey A. Chernov <ache@FreeBSD.org>

Optimize setting of DISRTCSET


# 62be8978 11-Dec-1994 Andrey A. Chernov <ache@FreeBSD.org>

Clean internal logic, helps for some unusual cases


# 9aa4fece 02-Nov-1994 Andrey A. Chernov <ache@FreeBSD.org>

-i case goes to background pause and acts like -a case on receiving
SIGTERM. This helps to keep CMOS clock updated before reboot.
Idea from J.Wunsch.


# f30089ed 02-Nov-1994 Andrey A. Chernov <ache@FreeBSD.org>

Restore back -i, -a


# 7ac030ad 01-Nov-1994 Andrey A. Chernov <ache@FreeBSD.org>

Remove options, run adjkerntz as daemon now


# 08354839 31-Oct-1994 Andrey A. Chernov <ache@FreeBSD.org>

Now:
adjkerntz -i writes kernel clock only, don't touch RTC clock
adjkerntz -a writes RTC clock only, don't touch kernel clock


# 025dc829 04-Oct-1994 Andrey A. Chernov <ache@FreeBSD.org>

Modify adjkerntz to not write RTC clock per initial call,
suggested by Bruce


# bb84bd5c 19-Sep-1994 Andrey A. Chernov <ache@FreeBSD.org>

rewritted to use sysctl, no more /var/run/.adjkerntz now


# 46ed4d4f 05-Feb-1994 Andrey A. Chernov <ache@FreeBSD.org>

Cosmetique patch from bde


# 0b2318d8 19-Dec-1993 Andrey A. Chernov <ache@FreeBSD.org>

Fix sign of offset diff.
Use Bruce initial/final hour scheme to avoid critical hours.


# 3e714780 16-Dec-1993 Andrey A. Chernov <ache@FreeBSD.org>

Attempt to import adjkerntz...