delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/12/30/10:27:59

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200012301527.QAA14155@father.ludd.luth.se>
Subject: Re: Fw: Patch for statfs.c
In-Reply-To: <OE73pjE5aHaZVrDs9aA00002209@hotmail.com> from Norberto Alfredo Bensa at "Dec 30, 2000 03:52:55 am"
To: djgpp-workers AT delorie DOT com
Date: Sat, 30 Dec 2000 16:27:44 +0100 (MET)
Cc: nbensa AT hotmail DOT com
X-Mailer: ELM [version 2.4ME+ PL54 (25)]
MIME-Version: 1.0
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

According to Norberto Alfredo Bensa:
> Hi Martin! Hi everyone!
> 
> Ok, I think I got it... now with network drives support.
> 
> From: "Martin Stromberg" <eplmst AT lu DOT erisoft DOT se>
> > > BTW, what does rescaling do? You're calling two services (2136 and
> >
> > It's been a while but I think it had something to do with me noticing
> > that INT 21, AX=0x7302 wasn't quite accurate so I falled back to the
> 
> ahhhh... that's it!... 322197*4096/32768 isn't integer, i.e. 322197 is not a
> power of 2!!!...

But 322197*32768/4096 is. And I think that's the order of the values.

> Can you please tell me if you remember at least one case where 217302
> wasn't giving accurate info? I have "#if 0...#endif"the rescaling for
> now, but it *must* be tested.

As I said, with the cvs code, you'd get the same results as earlier
versions of DJGPP (with free space < ~2GiB of course). Probably it
hasn't ever been accurate, or it's more accurate than chkdsk...

By the way did you use the already present #if 0-ed code (i. e. you
changed the 0 to 1)? I'm talking about this:
#if 0
      printf("Second: bsize = %ld, free = %ld, blocks = %ld.\n"
           , bsize
           , free
          , blocks
             );
#endif

I want to know because if you didn't we could just as well remove it.


> Now the patch...
> 
> ------CUT---------8<---------CUT------------
> --- src/libc/compat/sys/vfs/statfs.c.~ Mon Jun 19 19:00:56 2000
> +++ src/libc/compat/sys/vfs/statfs.c Sat Dec 30 02:41:26 2000
> @@ -108,73 +108,116 @@
> 
>    if (!cdrom_calls_used)
>    {
> -    /* Get free space info from DOS.  */
> -    regs.h.ah = 0x36;  /* DOS Get Free Disk Space call */
> -    regs.h.dl = drive_number + 1;

Your patch submission look alright this time.

I will test.


Thank you!

						MartinS

- Raw text -


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