From owner-freebsd-sparc Wed Aug 7 12:18:29 2002 Delivered-To: freebsd-sparc@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0C5637B400 for ; Wed, 7 Aug 2002 12:18:26 -0700 (PDT) Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3B1343E77 for ; Wed, 7 Aug 2002 12:18:25 -0700 (PDT) (envelope-from jake@k6.locore.ca) Received: from k6.locore.ca (jake@localhost.locore.ca [127.0.0.1]) by k6.locore.ca (8.12.5/8.12.3) with ESMTP id g77JOEVA016763; Wed, 7 Aug 2002 15:24:14 -0400 (EDT) (envelope-from jake@k6.locore.ca) Received: (from jake@localhost) by k6.locore.ca (8.12.5/8.12.3/Submit) id g77JOCRb016757; Wed, 7 Aug 2002 15:24:13 -0400 (EDT) Date: Wed, 7 Aug 2002 15:24:12 -0400 From: Jake Burkholder To: Patrick Cc: freebsd-sparc@FreeBSD.ORG Subject: Re: adjkerntz error Message-ID: <20020807152412.H76014@locore.ca> References: <20020802152957.V4442@locore.ca> <1028746803.4187.6.camel@m31> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <1028746803.4187.6.camel@m31>; from patrick@godloveya.com on Wed, Aug 07, 2002 at 03:00:02PM -0400 Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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