summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2011-01-09 14:34:56 +0000
committerbz <bz@FreeBSD.org>2011-01-09 14:34:56 +0000
commita8a58759e9ff992f98e8d6c34a591d3c94dd1108 (patch)
tree2634dc08e41db245e845bed57080ceffadcf6312
parent4f8260e700b5765d95a10d02fa5cccd633ac0954 (diff)
downloadFreeBSD-src-a8a58759e9ff992f98e8d6c34a591d3c94dd1108.zip
FreeBSD-src-a8a58759e9ff992f98e8d6c34a591d3c94dd1108.tar.gz
Improve style and wording of comments and sysctl descriptions [1].
Move machdep.ct_debug to debug.clocktime as there was no reason to actually put it under machdep in r216340. Submitted by: bde [1] MFC after: 3 days
-rw-r--r--sys/kern/subr_clock.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/sys/kern/subr_clock.c b/sys/kern/subr_clock.c
index de31c8c..dbd74f7 100644
--- a/sys/kern/subr_clock.c
+++ b/sys/kern/subr_clock.c
@@ -49,22 +49,14 @@ __FBSDID("$FreeBSD$");
#include <sys/sysctl.h>
#include <sys/timetc.h>
-static int ct_debug;
-static int adjkerntz; /* local offset from UTC in seconds */
-static int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
-
int tz_minuteswest;
int tz_dsttime;
/*
- * This have traditionally been in machdep, but should probably be moved to
- * kern.
+ * The adjkerntz and wall_cmos_clock sysctls are in the "machdep" sysctl
+ * namespace because they were misplaced there originally.
*/
-SYSCTL_INT(_machdep, OID_AUTO, ct_debug,
- CTLFLAG_RW, &ct_debug, 0, "Print ct debug if enabled.");
-SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock,
- CTLFLAG_RW, &wall_cmos_clock, 0, "CMOS clock keeps wall time");
-
+static int adjkerntz;
static int
sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS)
{
@@ -74,11 +66,18 @@ sysctl_machdep_adjkerntz(SYSCTL_HANDLER_ARGS)
resettodr();
return (error);
}
-
SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW,
&adjkerntz, 0, sysctl_machdep_adjkerntz, "I",
"Local offset from UTC in seconds");
+static int ct_debug;
+SYSCTL_INT(_debug, OID_AUTO, clocktime, CTLFLAG_RW,
+ &ct_debug, 0, "Enable printing of clocktime debugging");
+
+static int wall_cmos_clock;
+SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock, CTLFLAG_RW,
+ &wall_cmos_clock, 0, "Enables application of machdep.adjkerntz");
+
/*--------------------------------------------------------------------*
* Generic routines to convert between a POSIX date
* (seconds since 1/1/1970) and yr/mo/day/hr/min/sec
OpenPOWER on IntegriCloud