Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!stevec From: stevec@Apple.COM (Steve Christensen) Newsgroups: comp.sys.mac.programmer Subject: Re: SCSI HELP Keywords: SCSI Message-ID: <9977@goofy.Apple.COM> Date: 29 Aug 90 17:19:58 GMT References: <936@beguine.UUCP> Organization: Apple Computer Inc., Cupertino, CA Lines: 39 In article <936@beguine.UUCP> Eliot.Henry@samba.acs.unc.edu 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) > >Simple!. > >Steve: Will I be able to get at the whole disk this way or do i need to use > SCSI calls? Aha! It sounds like you want to erase every block on the entire disk, not just a particular partition. In that case you have some setup to do before you can erase anything. First, you have to unmount any volumes associated with that disk. Then you need to go thru the drive queue and remove drive entries, since the partition map and all partitions are going away. Finally you can erase the whole disk by calling the SCSI Manager. If you want to be able to use the drive after setting up a new partition map, then you'll have to somehow let the driver know how big the new partition is. I don't know how you'd do that, so I'll leave it as an exercise for the reader. BTW, why are you trying to do this yourself instead of letting something like HDSC Setup do it for you? steve -- ____________________________________________________________________ Steve Christensen Internet: stevec@goofy.apple.com Apple Computer, Inc. AppleLink: STEVEC 20525 Mariani Ave, MS 81-CS CompuServe: 76174,1712 Cupertino, CA 95014 "You just contradicted me." "No I didn't." ____________________________________________________________________