Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!ox.com!tbomb!time From: time@ice.com (Tim Endres) Newsgroups: comp.sys.mac.programmer Subject: Re: trapping for floppy disk Message-ID: <1CE00001.bcochit@tbomb.ice.com> Date: 25 Mar 91 04:10:49 GMT Reply-To: time@ice.com Organization: ICE Engineering, Inc. Lines: 21 X-Mailer: uAccess - Mac Release: 1.1.0b In article <6761@rex.cs.tulane.edu>, mandel@vax.anes.tulane.edu (Jeff E Mandel MD MS) writes: > >I am working on an init that traps on MountVol. What I want to do > >is to distinguish between floppies and hard disks. Can anybody help > >me out? Sample code would be appreciated. Thanks in advance. > > > I had to figure this out once, and I seem to recall deciphering it from the > Volume Control Block's vcbDrvNum field. I believe (but it may ONLY be a belief) > that this was always 1 or 2 for floppies. In any event, if you have to be > absolutely safe, you can walk the Drive Queue and check the flag bytes of the > Drive Queue Element for that drive number; byte 1 will tell you if the volume > is ejectable. See Inside Mac Vol IV pp 176-182 for confusion in greater depth. And won't the driver's Status call { PBStatus(drvStsCode) } give you the same information? ------------------------------------------------------------- Tim Endres | time@ice.com ICE Engineering | uupsi!ice.com!time 8840 Main Street | Voice FAX Whitmore Lake MI. 48189 | (313) 449 8288 (313) 449 9208