From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) Message-Id: <10111290426.AA13278@clio.rice.edu> Subject: Re: statfs not returning correct cluster size - 7302h and GNU df don't work either To: dennis-louie AT att DOT net (Dennis Louie) Date: Wed, 28 Nov 2001 22:26:33 -0600 (CST) Cc: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii), acottrel AT ihug DOT com DOT au (Andrew Cottrell), djgpp-workers AT delorie DOT com In-Reply-To: <002701c17889$185c9d60$0100a8c0@pentiumii> from "Dennis Louie" at Nov 28, 2001 07:50:44 PM X-Mailer: ELM [version 2.5 PL2] Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 Precedence: bulk > > Fixed--how? AFAIU, `statfs' does on W2K the best job it could, given > > the system calls implemented by W2K. How can we fix that? > > There must be a DOS function that can be made to return this information > correctly. Actually - no ... XP is no longer based at all on DOS, it's Windows 2000 in disguise. So the only API to get correct disk size is a Win32 API. It would be possible to use the NT LFN TSR concepts to hook and extend the DOS interrupts by calling the appropriate Win32 call. But this would be an inconvenient configuration item for casual DJGPP users on XP (or Win2K or Win NT). It would probably be worth adding this to some future version of the LFN TSR - if we can find someone motivated enough to do it and test it... > The current statfs code doesn't even try to use Functions 7302h or 7303h. > _osmajor is 5 for WinXP and the conditional only tries to execute those > functions if it's between 7 and 10 (whatever Windows versions they > correspond to). Dos 7 is Windows 95 and 98, Dos 8 is Win ME. There is no Dos 9. Dos 10 is actually OS2. Dos 5 is a real DOS, but Dos 5.50 is either Windows NT (any flavor, including NT 3.1, NT 3.51, NT 4.0, Windows 2000, Windows XP).