Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!snorkelwacker!think!samsung!cs.utexas.edu!asuvax!hrc!force!covertr From: covertr@force.UUCP (Richard E. Covert) Newsgroups: comp.sys.atari.st Subject: Re: 16 meg partition limit Summary: How do I get Disk Free space w/o using dfree() ?? Message-ID: <4885cc32.14a1f@force.UUCP> Date: 8 Feb 90 15:27:27 GMT References: <8503@pogo.WV.TEK.COM> Organization: gte Lines: 46 In article <8503@pogo.WV.TEK.COM>, bluneski@pogo.WV.TEK.COM (Bob Luneski) writes: > > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< WARNING >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > Under TOS 1.0,1.2, and 1.4 repeated use of Getbpb or Dfree will bring your > system crashing to a halt! The number of calls until failure depends on your > system memory utilization but averages in the 35-65 call range. This > little bug(feature) was discovered at great loss of time, sleep, and hair > (with a number of forehead bruises also). The real moral of the story is > never let someone else do what you can do yourself. Read in the boot sector > and pull the sector size off there! > > I strongly agree with Alan that it is the developers responsibility to query > the system and never to take anything for granted. > > **************************************************************************** > * Bob Luneski * Bob, I am writing Yet Another Disk Backup Program (YADBP tm of ME!!) and just how can I get the disk free space of a mountable device (like a floppy, or a sysquest cartidge, or even an optical floppy!!) if I can not rely on the repeated use of dfree?? This is a serious bug for me because I had planned to just call dfree() and be done with it. Now I need some other routine. I guess I can take your hint about reading the boot sector and getting the sector size from there. But are there risks in doing that?? Will that crash the system also?? Or does someone have a non-crashing version of dfree() that I can use? Does any one have C code (or ASM that is callable by MWC) that will work w/o crashing the system?? HELP!!! HELP!!! HELP!!! -- Richard E. Covert, Lead Engineer of Software Tools Group AG Communications Systems, Phoenix AZ (602) - 581-4652 TCP/IP: covertr@gtephx UUCP: {ncar!noao!asuvax | uunet!zardoz!hrc | att}!gtephx!covertr