Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!uw-beaver!zephyr.ens.tek.com!orca.wv.tek.com!pogo!bluneski From: bluneski@pogo.WV.TEK.COM (Bob Luneski) Newsgroups: comp.sys.atari.st Subject: Re: 16 meg partition limit Message-ID: <8511@pogo.WV.TEK.COM> Date: 8 Feb 90 20:47:16 GMT Reply-To: bluneski@pogo.WV.TEK.COM (Bob Luneski) Followup-To: <4885cc32.14a1f@force.UUCP> Organization: Tektronix, Inc., Wilsonville, OR. Lines: 34 In article <4885cc32.14a1f@force.UUCP>, covertr@force.UUCP (Richard E. Covert) writes: >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?? Why YADBP? Just buy Diamond Back(grin) >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? You don't want to just call Dfree because 1) It will cause system failure with repeated use and 2) it is VERRRRRRRY SLOOOOOOW for even small sized media. You can do the same job yourself reliably and much faster. All the information you need to determine free space on the disk is contained in the disk boot sector and the FAT table, you just have to know how to piece it together. When making your own disk free calculations it is important to remember that the ST file system is based on clusters not on bytes. If you do it right, there is no danger in doing it yourself and significantly less danger than letting TOS do it. **************************************************************************** * Bob Luneski * * Diamond Back Support Hotline: bluneski@pogo.WV.TEK.COM * * Genie: B.LUNESKI1 * * * * The opinions expressed herein are my own and in no way reflect the * * opinions of Tektronix, Inc. * ****************************************************************************