[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-sparc64
Subject:    Re: adjkerntz error
From:       Jake Burkholder <jake () locore ! ca>
Date:       2002-08-07 19:24:12
[Download RAW message or body]

Apparently, On Wed, Aug 07, 2002 at 03:00:02PM -0400,
	Patrick said words to the effect of;

> I was getting an error on adjkerntz (no such file or directory) when
> running /sbin/adjkerntz -a.
> 
> Using sysctl, I noticed that the machdep.adjkerntz is not equal to 2,
> but is instead 7.392.  Also, machdep.wall_cmos_clock is 7.394.
> 
> Are the oids supposed to be the same for the i386 as the sparc64?  I've
> patched my sparc64/include/cpu.h file and it has fixed my problem, but
> are the numbers going to change?

Hmm.  I guess this is due to the definitions of these sysctls in
kern/subr_clock.c using OID_AUTO, instead of the correct hard coded
oid values.  The numbers should be the same everywhere, and they can't
change without breaking the abi.

Thanks for pointing this out, I'll fix it.

Jake

> 
> Here is the patch:
> 
> *** cpu.h-ORIG  Tue Aug  6 23:22:24 2002
> --- cpu.h       Wed Aug  7 05:25:38 2002
> ***************
> *** 57,74 ****
>    * CTL_MACHDEP definitions.
>    */
>   #define CPU_CONSDEV           1       /* dev_t: console terminal
> device */
> ! #define       CPU_ADJKERNTZ           2       /* int: timezone offset
> (seconds) */
> ! #define       CPU_DISRTCSET           3       /* int: disable
> resettodr() call */
> ! #define CPU_BOOTINFO          4       /* struct: bootinfo */
> ! #define       CPU_WALLCLOCK           5       /* int: indicates wall
> CMOS clock */
> ! #define       CPU_MAXID               6       /* number of valid
> machdep ids */
>   
>   #define CTL_MACHDEP_NAMES { \
>         { 0, 0 }, \
>         { "console_device", CTLTYPE_STRUCT }, \
>         { "adjkerntz", CTLTYPE_INT }, \
>         { "disable_rtc_set", CTLTYPE_INT }, \
> -       { "bootinfo", CTLTYPE_STRUCT }, \
>         { "wall_cmos_clock", CTLTYPE_INT }, \
>   }
>   
> --- 57,72 ----
>    * CTL_MACHDEP definitions.
>    */
>   #define CPU_CONSDEV           1       /* dev_t: console terminal
> device */
> ! #define       CPU_ADJKERNTZ           392     /* int: timezone offset
> (seconds) */
> ! #define       CPU_DISRTCSET           393     /* int: disable
> resettodr() call */
> ! #define       CPU_WALLCLOCK           394     /* int: indicates wall
> CMOS clock */
> ! #define       CPU_MAXID               5       /* number of valid
> machdep ids */
>   
>   #define CTL_MACHDEP_NAMES { \
>         { 0, 0 }, \
>         { "console_device", CTLTYPE_STRUCT }, \
>         { "adjkerntz", CTLTYPE_INT }, \
>         { "disable_rtc_set", CTLTYPE_INT }, \
>         { "wall_cmos_clock", CTLTYPE_INT }, \
>   }
>   

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-sparc" in the body of the message


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic