[Bug 1203559] Re: wodim doesn't find my DVD writer

Ray Maslinski ray.maslinski at gmail.com
Tue May 12 18:01:16 UTC 2015


The change of device name should probably also be accompanied by an
update to the check_linux_26 function defined in the same scsi-linux-
sg.c file, which doesn't appear to deal with kernel major versions > 2:

BOOL check_linux_26() {
        int gen, tmp;
        struct utsname buf;
        return ( 0==uname( &buf ) && sscanf(buf.release, "%d.%d", &gen, &tmp)>1 
&& tmp>=6);
}

Note that the check is only looking for the minor version > 6, so the
behavior will revert to pre-2.6 device selection for kernel versions
3.0-3.5, 4.0-4.5, etc.

The pre-2.6 behavior uses /dev/sg* devices instead of /dev/scd* (or
/dev/sr* with the previously attached patch), probably due to lack of
support required in earlier driver versions.  While this will probably
work most of the time, I think there may be a potential for contention
with other applications using the device, as there doesn't appear to be
a locking mechanism across the /dev/sg* and /dev/sr* devices.  This
could allow (for example) an audio player using a /dev/sr* device to
interfere with wodim if it's using /dev/sg* for access.  Using the same
device driver for all access to the cd device should allow for
appropriate locking to prevent concurrent access.  There's a warning in
the code to this effect, though it seems to be disabled:

                                case(SG):
                                        {
                                                if(check_linux_26())
                                                        continue; 
#if 0
                                                /*
                                                 * Don't touch it on 2.6 until w
e have a proper locking scheme
                                                 */
                                                        if(nopen<=0)
                                                                fprintf(stderr, 
"Warning, using /dev/sg* for SG_IO operation. This method is considered harmful.
\n");
                                                        else if(found_scd)
                                                                continue;
#endif
                                                pattern="/dev/sg%d";
                                                first=0;
                                                last=255;
                                                break;
                                        }

There are a few other places referencing check_linux_26 beyond device
selection, presumably these would also behave more correctly with newer
kernels with a revised version check.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to cdrkit in Ubuntu.
https://bugs.launchpad.net/bugs/1203559

Title:
  wodim doesn't find my DVD writer

Status in cdrkit package in Ubuntu:
  Confirmed

Bug description:
  wodim --devices gives:

  wodim: No such file or directory. 
  Cannot open SCSI driver!
  For possible targets try 'wodim --devices' or 'wodim -scanbus'.
  For possible transport specifiers try 'wodim dev=help'.
  For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
  the wodim documentation.

  ProblemType: Bug
  DistroRelease: Ubuntu 13.04
  Package: wodim 9:1.1.11-2ubuntu3
  ProcVersionSignature: Ubuntu 3.8.0-26.38-generic 3.8.13.2
  Uname: Linux 3.8.0-26-generic x86_64
  ApportVersion: 2.9.2-0ubuntu8.1
  Architecture: amd64
  Date: Sun Jul 21 14:48:41 2013
  InstallationDate: Installed on 2013-05-25 (57 days ago)
  InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
  MarkForUpload: True
  SourcePackage: cdrkit
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cdrkit/+bug/1203559/+subscriptions



More information about the foundations-bugs mailing list