delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/13/02:23:48

Date: Thu, 13 Jul 2000 09:22:53 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Filetree disk size
In-Reply-To: <396CB1C5.56815648@phekda.freeserve.co.uk>
Message-ID: <Pine.SUN.3.91.1000713092214.12595A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 12 Jul 2000, Richard Dawe wrote:

> > > > Perhaps a future port of Fileutils could take care of this.
> 
> Well, since I'm in the process of porting fileutils 4.0, we could put this
> feature in.

The logical step would be to add code to `stat' that computes the
st_blocks field (it is not in `struct stat', so you will need to
change the definition of `struct stat' as well).  This could be done
by computing the cluster size for each drive letter the first time you
see that drive, and caching that value for future use.  Then you can
round up the file's size using that cluster size.

Once we support st_blocks, the changes to `du' to use it would be
trivial.  Ideally, the `configure' script should detect that and cause
`du' to use it automagically.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019