From owner-freebsd-hackers Tue Jul 22 15:47:58 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id PAA04354 for hackers-outgoing; Tue, 22 Jul 1997 15:47:58 -0700 (PDT) Received: from labs.usn.blaze.net.au (labs.usn.blaze.net.au [203.17.53.30]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA04341 for ; Tue, 22 Jul 1997 15:47:47 -0700 (PDT) Received: from labs.usn.blaze.net.au (davidn@local [127.0.0.1]) by labs.usn.blaze.net.au (8.8.6/8.8.5) with ESMTP id IAA00521; Wed, 23 Jul 1997 08:47:08 +1000 (EST) Message-Id: <199707222247.IAA00521@labs.usn.blaze.net.au> X-Mailer: exmh version 2.0gamma 1/27/96 To: Michael Smith cc: freebsd-hackers@FreeBSD.ORG Subject: Re: utmp/wtmp interface In-reply-to: Your message of "Tue, 22 Jul 1997 13:27:12 +0930." <199707220357.NAA26773@genesis.atrad.adelaide.edu.au> X-Face: (W@z~5kg?"+5?!2kHP)+l369.~a@oTl^8l87|/s8"EH?Uk~P#N+Ec~Z&@;'LL!;3?y Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 23 Jul 1997 08:47:07 +1000 From: David Nugent Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > What I am attempting to do is to define an API to access these > > files, not radically change the format of the files overnight. > > Ok, going back to this. With the xutmpinfo struct; is the plan to > only support one, or a colocated array of several terminated with one > with xi_type set to XUT_NONE? The latter. It is must be an array if it is not NULL. [wtmp] > Actually, I would have suggested a textual format, but I thought that > the screams would be audible from here. If you think it's a goer, you > have my absolute support. Given the space savings, I can't see any reason for it NOT to be text. All but a couple of the fields are text anyway. :) I recently played with a 13mb wtmp which reduced down to 4.8mb when converted to variable-length text (this was a 8-character username system too), which should give you some idea of the potential savings. This will make it harder for things like last(1) to page back through the file from the end, but life is sometimes tough. Besides, last(1) will use the API, which will handle this transparently in any case, including the buffering. > > The point is whether there is any benefit in making it > > thread-safe. :-) > > Good question. Maybe save worrying about that until it needs to be? Well, given the lack of easy alternatives, I did that. :) Regards, David -- David Nugent - Unique Computing Pty Ltd - Melbourne, Australia Voice +61-3-9791-9547 Data/BBS +61-3-9792-3507 3:632/348@fidonet davidn@freebsd.org davidn@blaze.net.au http://www.blaze.net.au/~davidn/