Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!mimsy!mojo!russotto From: russotto@eng.umd.edu (Matthew T. Russotto) Newsgroups: comp.sys.mac.programmer Subject: Re: determining if a drive is a hard drive Keywords: drive queue hard drive tough problems not enough info etc Message-ID: <1990Oct9.020046.16682@eng.umd.edu> Date: 9 Oct 90 02:00:46 GMT References: <1262@beguine.UUCP> Sender: news@eng.umd.edu (The News System) Organization: College of Engineering, Maryversity of Uniland, College Park Lines: 25 In article <1262@beguine.UUCP> Eliot.Henry@samba.acs.unc.edu (BBS Account) writes: > > I want to ignore remote drives (the program erases drives and uses low level >calls to do it besides even if i could treat the remote drives the same I don't >want to erase them) I want to determine what hard drives are connected and their >volume names. It seems like such a simple problem. Someone must have done it. >This is a reply to the person who said "what exactly do you need to know" >I also need to determine if each hard drive is a scsi device so i can treat >it differently. > >So far the best sounding answer i have suggests going through the drive queue >looking for drives with driver numbers other than -5 that are unejectable and >have a certain minimum size. (don't forget writeable-- you won't get anywhere erasing a CD-ROM) One more thing-- you will first probably want to search the SCSI bus for drives first, and save some descriptive info about any you find. That way you will know what drives are SCSI and what drives are not You really want to erase all hard drives connected to your system? Sounds like a dangerous program to leave lying around!!! (hard to test, too) -- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu .sig under construction, like the rest of this campus.