Re: Lock drive



Thomas Schmitt <scdbackup gmx net> wrote:

Hi,

Lelouch the Kid:
If you guys could explain to me how the lock drive works and how can I do
that, I would be eternally grateful.

Joerg Schilling:
Just call 
        cdrecord -lock

This is not enough didactical effort to gain eternal gratitude.

Well, this iw not correct, as cdrecord offers the -V option

At the lowest level which is in reach for us, the tray locking is
done by SCSI command 0x1E PREVENT ALLOW MEDIUM REMOVAL. It is
documented in volume SPC of the SCSI specs. E.g. SPC-3.
Lock:    1E 00 00 00 01 00
Unlock:  1E 00 00 00 00 00

Afaik, this has no effect on laptop drives with no tray motor.

You are wrong.

On e.g. Linux we transport this command to the drive by ioctl(SG_IO).
See struct sg_io_hdr in /usr/include/scsi/sg.h.

Why using something non-portable when there is a highly portable libscg that is 
part of cdrtools?

Jörg

-- 
 EMail:joerg schily isdn cs tu-berlin de (home) Jörg Schilling D-13353 Berlin
       js cs tu-berlin de                (uni)  
       joerg schilling fokus fraunhofer de (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]