Use the CPU_* OID constants instead of OID_AUTO for the clock-related
sysctls for compatability with old applications.
This commit is contained in:
parent
dde5f1949f
commit
d88d37d604
@ -66,6 +66,9 @@
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/timetc.h>
|
||||
|
||||
/* XXX: for the CPU_* sysctl OID constants. */
|
||||
#include <machine/cpu.h>
|
||||
|
||||
#include "clock_if.h"
|
||||
|
||||
static __inline int leapyear(int year);
|
||||
@ -93,13 +96,13 @@ int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
|
||||
* These have traditionally been in machdep, but should probably be moved to
|
||||
* kern.
|
||||
*/
|
||||
SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW,
|
||||
SYSCTL_PROC(_machdep, CPU_ADJKERNTZ, adjkerntz, CTLTYPE_INT|CTLFLAG_RW,
|
||||
&adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "");
|
||||
|
||||
SYSCTL_INT(_machdep, OID_AUTO, disable_rtc_set,
|
||||
SYSCTL_INT(_machdep, CPU_DISRTCSET, disable_rtc_set,
|
||||
CTLFLAG_RW, &disable_rtc_set, 0, "");
|
||||
|
||||
SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock,
|
||||
SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock,
|
||||
CTLFLAG_RW, &wall_cmos_clock, 0, "");
|
||||
|
||||
static int
|
||||
|
@ -66,6 +66,9 @@
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/timetc.h>
|
||||
|
||||
/* XXX: for the CPU_* sysctl OID constants. */
|
||||
#include <machine/cpu.h>
|
||||
|
||||
#include "clock_if.h"
|
||||
|
||||
static __inline int leapyear(int year);
|
||||
@ -93,13 +96,13 @@ int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */
|
||||
* These have traditionally been in machdep, but should probably be moved to
|
||||
* kern.
|
||||
*/
|
||||
SYSCTL_PROC(_machdep, OID_AUTO, adjkerntz, CTLTYPE_INT|CTLFLAG_RW,
|
||||
SYSCTL_PROC(_machdep, CPU_ADJKERNTZ, adjkerntz, CTLTYPE_INT|CTLFLAG_RW,
|
||||
&adjkerntz, 0, sysctl_machdep_adjkerntz, "I", "");
|
||||
|
||||
SYSCTL_INT(_machdep, OID_AUTO, disable_rtc_set,
|
||||
SYSCTL_INT(_machdep, CPU_DISRTCSET, disable_rtc_set,
|
||||
CTLFLAG_RW, &disable_rtc_set, 0, "");
|
||||
|
||||
SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock,
|
||||
SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock,
|
||||
CTLFLAG_RW, &wall_cmos_clock, 0, "");
|
||||
|
||||
static int
|
||||
|
Loading…
x
Reference in New Issue
Block a user