Thu 06 Jul 2006 02:03:42 AM UTC, comment #2:
I've found an easier way to fix it, in cdrecord.c is something like this:
/* definition de tous les type de bus */
Tsearchdrive listesearchdrives[] = {
{ "", "", "SCSI", 110 }, /* scsi (sg) */
#if LINUX_IDE /* pure ide devices with linux */
{ "dev=/dev/hda", "/dev/hda", "IDE", 100 },
{ "dev=/dev/hdb", "/dev/hdb", "IDE", 100 },
...
#endif
{ "dev=ATA:", "ATA:", "ATA", 60 }, /* ide sg */
{ "dev=ATAPI:", "ATAPI:", "ATAPI", 40 }, /* ide */
{ NULL, NULL, NULL, 0}
};
Just change the order to make it look like this:
/* definition de tous les type de bus */
Tsearchdrive listesearchdrives[] = {
{ "dev=ATA:", "ATA:", "ATA", 60 }, /* ide sg */
{ "dev=ATAPI:", "ATAPI:", "ATAPI", 40 }, /* ide */
{ "", "", "SCSI", 110 }, /* scsi (sg) */
#if LINUX_IDE /* pure ide devices with linux */
{ "dev=/dev/hda", "/dev/hda", "IDE", 100 },
{ "dev=/dev/hdb", "/dev/hdb", "IDE", 100 },
...
#endif
{ NULL, NULL, NULL, 0}
};
The problem is in cdrecord.c, somewhere in that file the command cdrecord -prcap dev=%s is called, but if dev is dev=x,y,z and the device is ATAPI, cdrecord fails to detect the drive, to avoid this, dev should be dev=ATAPI:x,y,z for cdrecord to work properly.
Due to the order of the elements in listsearchdrives[], when ATAPI drives are detected, they get x,y,z devices assigned instead of ATAPI:x,y,z because they are first detected as SCSI, and when it gets to ATAPI detection, drives are already in the drive list (as SCSI, with dev=x,y,z style device names) and are discarded.
|