delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/12/31/12:02:33

Date: Tue, 31 Dec 2002 18:59:56 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-Id: <1659-Tue31Dec2002185955+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9
In-reply-to: <3E10A13E.75FD92FB@phekda.freeserve.co.uk> (message from Richard
Dawe on Mon, 30 Dec 2002 19:40:46 +0000)
Subject: Re: Problem with df reporting the wrong sizes [PATCH]
References: <E18Szay-0000eR-00 AT phekda DOT freeserve DOT co DOT uk> <7263-Mon30Dec2002205236+0200-eliz AT is DOT elta DOT co DOT il> <3E10A13E DOT 75FD92FB AT phekda DOT freeserve DOT co DOT uk>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Mon, 30 Dec 2002 19:40:46 +0000
> From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
> 
> But what do we do in the case where we do not know the sector size in bytes?
> We have two choices:
> 
> * return the cluster size in bytes;
> * return some number - e.g.: 512 bytes.
> 
> I prefer the former.

What are the practical cases where we don't know the sector size?  Is
that for CDs only, or are there other types of media with this
problem?

For CD, I think we can return 2048 bytes as the cluster size.  The
first of the above 2 alternatives is also okay, I think, provided that
we don't overflow some of the struct members as the result.

> Is there any point returning the sector size, if we do not always know it?

If we do know in most cases, it's justified, I think.

> Are sector sizes always a power of 2?

AFAIK, yes.

- Raw text -


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