Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!bionet!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: MFS vs. HFS -- Help wanted Message-ID: <34183@apple.Apple.COM> Date: 21 Aug 89 19:50:53 GMT References: <10002@phoenix.Princeton.EDU> <3716@internal.Apple.COM> Organization: Apple Computer Inc, Cupertino, CA Lines: 28 In article <3716@internal.Apple.COM> blob@apple.com (Brian Bechtel) writes: >In article <10002@phoenix.Princeton.EDU> svpillay@phoenix.Princeton.EDU >(Kanthan Pillay) writes: > >> Ideally, I would like to know how big the diskette is, but >> knowing whether it is MFS will do for now. > >To find the size of a volume, call PBHGetVInfo. The size is the product >of the number of allocation blocks and the allocation block size. >(ioVNmAlBlks * ioVAlBlkSiz) > >See page IV-130 and IV-123-124 of Inside Macintosh for more details. Thanks for the tip on this Brian. I just wanted to add on thing. We get a lot of developers who try to use this equation, and get upset when it doesn't work in all cases. It is important to remember - especially in Pascal - that ioVNmAlBlks is an UNSIGNED quantity. If you don't take that into account, you often get negative results. This is shown in DTS Sample Code #018: StdFile (plug, plug). ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. --- Developer Technical Support INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "Argue for your Apple, and sure enough, it's yours" - Keith Rollin, Contusions