[comp.sys.mac.programmer] Hardware write protect in SCSI disk driver

bob@csispt.UUCP (Bob Finch) (12/08/89)

How should a SCSI disk driver that supports removable media tell the
Mac OS that the drive is hardware write protected?

I've tried setting bit 7 in byte 0 of the flags that precede the drive
queue element for my drive (IM IV page 181) in a VBL task when a disk
is inserted just before doing a PostEvent to get it mounted.

I've also tried responding to drvStsCode (csCode 8) Status calls with
DrvSts record with writeProt bit 7 set (IM II page 215).

Thanks in advance...

--
Bob Finch   bob%csispt.UUCP@unicorn.wwu.edu   +1 (206) 671-6214

allanh@netcom.UUCP (Allen Hessenflow) (12/08/89)

In article <1989Dec7.202804.6903@csispt.UUCP>, bob@csispt.UUCP (Bob Finch) writes:
> 
> How should a SCSI disk driver that supports removable media tell the
> Mac OS that the drive is hardware write protected?
> 
All you should need to do is exactly what you said you've done.  When I
first tried to implement write protection on a removable media device 
it didn't work because I only set the bit in the dqe but didn't respond
to status calls at all.  As soon as I implemented status calls everything
worked.

-- 
apple!netcom!allanh    allanh@netcom.uucp