The new Linux SG Driver and Cdrecord 1.8

Cdrecord is a program for burning CDRs and CDRWs written by Joerg Schilling. The most recent production version of this program is 1.6.1 and is used by other programs such as xcdroast by Thomas Niederreiter and has a user-friendly X interface. The production version of cdrecord (1.6.1) assumes the original sg device driver and will have no problems with this new sg driver.

Joerg Schilling has an alpha version of cdrecord available with more advanced features. The latest published version of this alpha is 1.8a22 and includes a patch to the sg driver written by Heiko Eissfeldt who collaborates with Joerg. Even though 1.8a22 can work with the original sg driver, it has better error detection and reporting when Heiko's sg patches are applied. Similar features are offered by my new sg driver interface but not in a binary compatible way. I made an attempt to merge the 2 interfaces but this was not accepted by Joerg who produced an alternate version which was essentially Heiko's interface grafted onto my implementation. By my analysis both these approaches have flaws so after some consultations I decided to withdraw the merged interface and restore the new sg driver's original interface.

Cdrecord 1.8 has multiple transport layer components that translate various OSes packet drivers to a common interface. There are 2 of these for Linux: one for sg and one for pg which is the parallel port packet driver written by Grant Guenther. After studying the transport layer for sg I have decided to make my own patches for it available in the hope of making cdrecord 1.8 more flexible and robust on a Linux platform. The major change is to make that transport layer recognize 1 of 3 sg variants at runtime and make the maximum use of the facilities available. The 3 versions are the original (hence backward compatible to 2.0.x and before), Heiko Eissfeldt's sg version from November 1998 and my sg driver (preferably version 2.1.30 or later). Some scanning issues and other problems have been addressed as well (see notes near the top of the source file concerned for a list of changes).

Only 1 file in cdrecord 1.8a20 is effected by my patch: libscg/scsi-linux-sg.c . That file has not changed between cdrecord versions 1.8a19 and 1.8a20. Before attempting to apply my patch, I recommend that you take a copy of the original file. The patch is available in 2 forms. The first form is a tarball cdr18_lin_tr2.tgz that should be untarred in the top level cdrecord-1.8 directory. The second form is a gzipped patch file cdr18_lin_tr2.diff.gz that should be applied in the directory above the top level cdrecord-1.8 directory (i.e. in a similar fashion to Linux kernel patches).

This patch has been tested with cdrecord 1.8a19 in normal and error conditions. If you have any problems or questions about this patch, please address them to me.

Return to main page.

Last updated: 12th October 1999, 10:00