From owner-freebsd-sparc64@FreeBSD.ORG Mon Apr 19 14:09:48 2004 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94A2716A4CE; Mon, 19 Apr 2004 14:09:48 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74A5843D1D; Mon, 19 Apr 2004 14:09:48 -0700 (PDT) (envelope-from peter@evilpete.dyndns.org) Received: from fw.wemm.org (canning.wemm.org [192.203.228.65]) by canning.wemm.org (Postfix) with ESMTP id 508E22A7EA; Mon, 19 Apr 2004 14:09:48 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (Postfix) with ESMTP id 09946E259; Mon, 19 Apr 2004 14:09:50 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from overcee.wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (8.12.11/8.12.11) with ESMTP id i3JL8v68073281; Mon, 19 Apr 2004 14:08:57 -0700 (PDT) (envelope-from peter@overcee.wemm.org) Received: from localhost (localhost [[UNIX: localhost]]) by overcee.wemm.org (8.12.11/8.12.11/Submit) id i3JL8v2M073280; Mon, 19 Apr 2004 14:08:57 -0700 (PDT) (envelope-from peter) From: Peter Wemm To: freebsd-sparc64@freebsd.org Date: Mon, 19 Apr 2004 14:08:56 -0700 User-Agent: KMail/1.6.1 References: <20040301145508.GA27240@seekingfire.com> <20040301150312.GQ35475@elvis.mu.org> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404191408.56929.peter@wemm.org> cc: Garance A Drosihn cc: sparc64@freebsd.org Subject: Re: Minor problem with 64bTT: monthly accounting figures X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2004 21:09:48 -0000 On Monday 01 March 2004 11:03 am, Garance A Drosihn wrote: > At 4:03 PM +0100 3/1/04, Maxime Henrion wrote: > >Tillman Hodgson wrote: > >> Look a little odd this month: > >> > >> Subject: caliban.rospa.ca monthly run output > >> > >> Doing login accounting: > >> root 0.84 > >> total -298848.27 > >> toor -298849.12 > >> > > > -- End of monthly output -- > > This would be from the output of the 'ac' command. I tried > this on my 64-bTT machine, and it seemed to be working OK. > > >This is probably because the time is stored as a 32-bits integer > >in /var/run/utmp and /var/log/wtmp. > > If the time-value is defined as a fixed 32-bit integer (instead > of being time_t), then the records themselves should be fine. The > records (as written) won't be changing in size due to this change. > > So, if there is a bug here then it'll probably be in the 'ac' > program. That's my guess, at least. We can look into that some > more, but don't need to address it right away. Just fyi, ac does things like this: time_t ut_timecopy; ut_timecopy = _time32_to_time(event_up->ut_time); strlcpy(str_result, ctime(&ut_timecopy), sizeof(str_result)); However, there is also a big scary comment that says: * With sparc64 using 64-bit time_t's, there is some system * routine which sets ut_time==0 (the high-order word of a * 64-bit time) instead of a 32-bit time value. It sounds like something clobbers ut_time.. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5