Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!rex!vax.anes.tulane.edu!MANDEL From: mandel@vax.anes.tulane.edu (Jeff E Mandel MD MS) Newsgroups: comp.sys.mac.programmer Subject: Re: trapping for floppy disk Message-ID: <6761@rex.cs.tulane.edu> Date: 25 Mar 91 01:48:35 GMT References: <1991Mar19.164204.8847@hubcap.clemson.edu> Sender: news@rex.cs.tulane.edu Reply-To: mandel@vax.anes.tulane.edu Organization: Tulane University School of Medicine Lines: 18 In article <1991Mar19.164204.8847@hubcap.clemson.edu>, mcmac@hubcap.clemson.edu (Scott McAlister) 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. Jeff E Mandel MD MS Asst. Professor of Anesthesiology Tulane University School of Medicine New Orleans, LA mandel@vax.anes.tulane.edu