Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!well!gurgle From: gurgle@well.sf.ca.us (Pete Gontier) Newsgroups: comp.sys.mac.programmer Subject: Re: Determining if a drive is a hard drive Message-ID: <21041@well.sf.ca.us> Date: 6 Oct 90 17:23:01 GMT References: <1219@beguine.UUCP> <20945@well.sf.ca.us> <1990Oct4.205555.3700@eng.umd.edu> Organization: cellular Lines: 41 In article <1990Oct4.205555.3700@eng.umd.edu> russotto@eng.umd.edu (Matthew T. Russotto) writes: >In article <20945@well.sf.ca.us> gurgle@well.sf.ca.us (Pete Gontier) writes: >>In article <1219@beguine.UUCP> Eliot.Henry@samba.acs.unc.edu writes: >>> I need to figure out how to create a list of all hard drives >>>(BOTH SCSI and nonSCSI) >> >>Whew! This is a doozy. What I've done in the past is very complex. Here's a >>summary: >> >Hmm.. it isn't actually that hard-- why not walk the drive queue looking >for nonejectable, writeable drives? >(Call drivestatus to see if the drive is writeable-- this will exclude CDs, >and hardware-locked hard drives) Well, the problem with this method is that as soon as you have Syquest volumes lying around, your test fails, because they're ejectable. The sad part is that even my test fails to gather info regarding these drives. It turns out that as we used the method of getting the volume's driver name, it became apparent that third parties found it necessary to name their SCSI drivers something other than ".SCSI00" and third-party CD-ROM makers found it necessary to do something similar. Why this happened, I don't know. Maybe Apple told them not to use the name. I suspect, though, that it was ego. This is a sticky problem; I think Apple's paradigm of device-independence breaks down in some places. Or is enforced too enthusiastically. >(you won't get any remote volumes, but you can't find out what they are >anyway) Sure you can; do it by running the VCB queue and querying driver names as I explained. What I'd really like to see as a response from Apple to all this is a ROM call, perhaps named GetVCBInfo, which would parallel GetFCBInfo. But even that wouldn't help with the naming problems. It would have to be more comprehensive. -- Pete Gontier, gurgle@well.sf.ca.us Software Imagineer, Kiwi Software, Inc.