> >8<------8<------8<------8<------8<------8<------8<------8<------8<------
> >/*
> > * CD-RW blanking utility for Linux by <[EMAIL PROTECTED]>.
>
> Well besides the fact that your program is nonportable and relies on a
> Linux proprietary interface introduced recently:
The next line read "this is proof-of-concept code." The sole reason for
deploying Linux proprietary interface is for faster coding [and
distribution]. The idea is rather to have people try it out with their
drives in order to figure out if IMMED works "already" (at the very
least it does with mine Ricoh OEM drive).
> Note that while most ATAPI drives allow to use the IMMED bit, I am not able
> to reliably distinguish SCSI drives from ATAPI drives.
How about "GET CONFIGURATION(46h)", ask for "Core Feature(01)" profile,
read "Physical Interface Standard" and compare it to 2? Works for me!!!
In terms of Linux proprietary interface (sorry, J�rg, but you do get the
idea even though you're disgusted by the appearance, right:-):-):-):
unsigned char profile[16];
memset (&cgc,0,sizeof(cgc));
cgc.buffer = profile;
cgc.buflen = sizeof(profile);
cgc.data_direction = CGC_DATA_READ;
cgc.cmd[0] = 0x46; /* GET CONFIGURATION */
cgc.cmd[3] = 1; /* Ask for Core Feature */
cgc.cmd[8] = sizeof(profile);
ioctl (fd,CDROM_SEND_PACKET,&cgc);
Last four bytes of profile[] comprise "Physical Interface Standard," 1
stands for SCSI, 2 - ATAPI, 3,4 - 1394, 5 - Fibre Channel...
> Several years ago, I did some tests with drives and tried to make the IMMED
> bit the default for blanking and other things that take a long time.
> >From the tests, I can tell that not all drives work as expected if the IMMED
> bit is used. Some drives don't acept it at all, other drives behave unfriendly
> and it is impossible to find the real end of the operation.
So why don't we make it optional with -immed command line option and
[optionally] disable it [the -immed option] on drives not identifying
themselves as ATAPI in reply to "GET CONFIGURATION(46h)" [assuming that
such not responding in appropriate manner are not MMC-3 compliant]?
Cheers. A.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]