Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!sdd.hp.com!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!midway!ellis.uchicago.edu!dwal From: dwal@ellis.uchicago.edu (David Walton) Newsgroups: comp.sys.mac.programmer Subject: Re: SCSI HELP Keywords: SCSI Message-ID: <1990Aug28.202805.5947@midway.uchicago.edu> Date: 28 Aug 90 20:28:05 GMT References: <936@beguine.UUCP> Sender: news@midway.uchicago.edu (News Administrator) Organization: U. Chicago Computing Organizations, Academic and Public Comp. Lines: 46 In article <936@beguine.UUCP> Eliot.Henry@samba.acs.unc.edu (BBS Account) writes: >Thanks for the info. Yes I want to completley erase the hard drive partition and all partition info etc . So would i use this routine: > >FUNCTION FSWrite (refNum: INTEGER; VAR count: LONGINT; buffPtr: Ptr) > : OSErr; [Not in ROM] > >and simply send it the refnum of the driver for the hard drive (obtained from >going through the volume list and doing pbhgetvinfo on each drive) No. First, the refnum in FSWrite isn't the driver refnum, it's an access path refnum to an open file managed by the file Manager. Second, this call applies to the partition that houses the Macintosh file system on the disk, so you wouldn't be able to redo the partition information this way. I don't think you would use this call to erase the disk in any case, because this one just writes to a particular file. Before you go wiping out partition information, I suggest that you read up a bit. The following chapters of Inside Macintosh might be helpful: Volume II, Ch. 4 (esp. Data organization on volumes), Ch. 6 (Structure of a Device Driver & Writing Your Own), Ch. 14 (Disk Initialization Package) Volume IV, Ch. 19 (Data organization on volumes revisited), Ch. 26 (Disk Initialization Package revisited), Ch. 31 (SCSI Manager), Volume V, Ch. 31 (SCSI Manager revisited) These recommendations are based on a scanty knowledge of how to manage low-level interactions with SCSI devices and drivers. Others, I'm sure, will have additional (and probably better) references. Hope this helps. -- David Walton Internet: dwal@midway.uchicago.edu University of Chicago { Any opinions found herein are mine, not } Computing Organizations { those of my employers (or anybody else). }