freebsd-ports/audio/kio-audiocd/files/patch-audiocd.cpp
Max Brazhnikov cb8b1428c6 KDE/FreeBSD team presents KDE SC 4.9.5 ports!
- kdebindings ports have been renamed to match upstream.
- kdemultimedia and kdenetwork have been split.
- New port games/pairs added.
- Trim Makefile header
- Convert to new option framework
- New USE_KDE4 components: libkcddb, libkcompactdisc
- Update:
	databases/akonadi to 1.9.0
	devel/grantlee to 0.3.0
	textproc/rasqal to 0.9.30
	textproc/redland-bindings to 1.0.16.1
	textproc/soprano to 2.9.0
	x11-toolkits/attica to 0.4.1

The area51 repository features commits by Schaich Alonso, avilla, dbn,
jhale, makc and rakuco.

Contributors:
- Oleg Sidorkin
- Tobias Berner
- Kurt Jaeger
2013-02-03 20:10:37 +00:00

43 lines
1.3 KiB
C++

--- audiocd.cpp.orig 2010-06-06 08:15:20.000000000 -0400
+++ audiocd.cpp 2010-06-06 08:18:01.000000000 -0400
@@ -229,20 +229,21 @@
// name associated with the device, which throws the rest of audiocd
// for a loop.
//
+ QString devname;
if ( !(drive->dev) || (COOKED_IOCTL == drive->interface) )
{
// For ATAPI devices, we have no real choice. Use the
// user selected value, even if there is none.
//
kWarning(7117) << "Found an ATAPI device, assuming it is the one specified by the user.";
- cd->setDevice( drive->cdda_device_name );
+ devname = drive->cdda_device_name;
}
else
{
kDebug(7117) << "Found a SCSI or ATAPICAM device.";
if ( strlen(drive->dev->device_path) > 0 )
{
- cd->setDevice( drive->dev->device_path );
+ devname = drive->dev->device_path;
}
else
{
@@ -250,13 +251,14 @@
// circumstances, so build a representation from
// the unit number and SCSI device name.
//
- QString devname = QString::fromLatin1( "/dev/%1%2" )
+ devname = QString::fromLatin1( "/dev/%1%2" )
.arg( drive->dev->given_dev_name )
.arg( drive->dev->given_unit_number ) ;
kDebug(7117) << " Using derived name " << devname;
- cd->setDevice( devname );
}
}
+ if ( cd->deviceName() != devname )
+ cd->setDevice( devname );
#else
#ifdef __GNUC__
#warning audiocd ioslave is not going to work for you