delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/12/17/01:21:03

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: 17 Dec 2003 08:20:46 +0200
Message-Id: <upteodkxt.fsf@elta.co.il>
From: Eli Zaretskii <eliz AT elta DOT co DOT il>
To: djgpp AT delorie DOT com
In-reply-to: <EizDb.3309281$Of.514843@news.easynews.com> (message from Rob
Kramer on Tue, 16 Dec 2003 08:24:04 GMT)
Subject: Re: statfs() doc patch.
References: <EizDb.3309281$Of DOT 514843 AT news DOT easynews DOT com>
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

> From: Rob Kramer <robk AT starhub DOT net DOT sg>
> Newsgroups: comp.os.msdos.djgpp
> Date: Tue, 16 Dec 2003 08:24:04 GMT
> 
> I recently spent some time figuring out why my statfs calls were
> intermittently misreporting the number of free blocks. I'm using latest CVS
> on a Win98 DOS-mode OS with a 20GB FAT16 drive split in many 2GB partitions
> (ugh).
> 
> With some tracing I found out it was because I didn't specify the drive
> letter fully ("c:" instead of "c:\"), causing the call to return -1 for
> blocks free, or sometimes the correct value. RBIL explains this:
> 
> INT 21 - Windows95 - FAT32 - GET EXTENDED FREE SPACE ON DRIVE
>         AX = 7303h
> 
> [chop]
> 
>     under DOS 7.x (i.e. "MSDOS Mode" under Windows95), the ASCIZ string
>     pointed at by DS:DX *must* include the drive letter, or this function
>     will return CF set/AX=0015h (invalid drive).  In a DOS box, omitting
>     the drive letter (DS:DX -> "\") results in the free space for the
>     current default drive, as expected
> 
> On FAT32 the problem doesn't occur, either because 0x7303 works, or because
> 0x7302 is used. 
> 
> Perhaps a note in the documentation would be a good idea:

Thanks for looking into this and for finding a solution.

However, I don't see how what you found is explained by the cited
fragment from RBIL: it does not say, as far as I could see, that "C:"
will lead to a failure while "C:\" will succeed.

So it sounds like you found some bug, either in DJGPP or in Windows,
but that bug is not documented in RBIL.

Am I missing something?

- Raw text -


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