From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <35992d694f31a273c22d566c97330318@orthanc.cc.titech.ac.jp> To: 9fans@cse.psu.edu Subject: Re: [9fans] how to truncate a file? From: YAMANASHI Takeshi Date: Fri, 15 Oct 2004 11:04:49 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: eed243fc-eacd-11e9-9e20-41e7f4b1d025 On Fri Oct 15 09:53:05 JST 2004, Russ Cox wrote: > int > ftruncate(int fd, vlong length) > { > Dir d; > nulldir(&d); > d.length = length; > return dirfwstat(fd, &d); > } FYI, I tried and got the following results: It worked on: fossil ramfs It didn't on: ken's fs kfs Thanks, again. I'm fortunate that I had moved to fossil. :) --