From owner-freebsd-hackers Tue Jan 14 15:43:46 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id PAA16054 for hackers-outgoing; Tue, 14 Jan 1997 15:43:46 -0800 (PST) Received: from mail.crl.com (mail.crl.com [165.113.1.22]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id PAA16049 for ; Tue, 14 Jan 1997 15:43:42 -0800 (PST) From: proff@suburbia.net Received: from pdx1.world.net by mail.crl.com with SMTP id AA23059 (5.65c/IDA-1.5 for ); Tue, 14 Jan 1997 15:43:29 -0800 Received: from suburbia.net (suburbia.net [203.4.184.1]) by pdx1.world.net (8.7.5/8.7.3) with SMTP id PAA05249 for ; Tue, 14 Jan 1997 15:42:05 -0800 (PST) Received: (qmail 5397 invoked by uid 110); 14 Jan 1997 23:40:38 -0000 Message-Id: <19970114234038.5396.qmail@suburbia.net> Subject: Re: truss, trace ?? In-Reply-To: <199701141646.JAA29888@phaeton.artisoft.com> from Terry Lambert at "Jan 14, 97 09:46:17 am" To: terry@lambert.org (Terry Lambert) Date: Wed, 15 Jan 1997 10:40:38 +1100 (EST) Cc: hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL28 (25)] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > "Natural" for text files, maybe. > > For the wtmp file, it's not so natural... it's wierd, even, since you > can't resync to a valid record boundry without sync data built into > the data format. > > For text files, the sync data can be "after the first \n", since it > is a variable length record format with "\n" record seperators, but > how do you resync wtmp? > > > Terry Lambert It's quite easy actually. There are two ways: (a) always truncate by the size of the last write. (b) define the cycle period to be a multiple of the record size. Cheers, Julian