[Pkg-utopia-maintainers] Bug#550316: Bug#550316: devicekit-disks: Prevents CD from ejecting
Josselin Mouette
joss at debian.org
Sun Oct 18 13:52:53 UTC 2009
Le lundi 12 octobre 2009 à 18:12 +0200, Josselin Mouette a écrit :
> > > Whenever devkit-disks-daemon is started, I cannot eject my CD drive
> > > anymore. Pressing the button lets it open and close immediately, before
> > > the tray can be completely out.
> >
> > Should be fixed in 007-2
>
> Unfortunately it is not, the symptoms are still the same.
As requested on IRC, I tested this quick hack to work around broken code
that identifies CD drives (my drive being /dev/hdb):
Index: devicekit-disks-008/src/devkit-disks-poller.c
===================================================================
--- devicekit-disks-008.orig/src/devkit-disks-poller.c 2009-10-18 10:07:25.000000000 +0200
+++ devicekit-disks-008/src/devkit-disks-poller.c 2009-10-18 10:08:04.000000000 +0200
@@ -110,7 +110,7 @@ devkit_disks_poller_poll_device (const g
int fd, fd2;
/* the device file is the canonical device file from udev */
- is_cdrom = (g_str_has_prefix (device_file, "/dev/sr") || g_str_has_prefix (device_file, "/dev/scd"));
+ is_cdrom = (g_str_equal (device_file, "/dev/hdb") || g_str_has_prefix (device_file, "/dev/sr") || g_str_has_prefix (device_file, "/dev/scd"));
#ifdef POLL_SHOW_DEBUG
g_print ("**** POLLER (%d): polling %s\n", getpid (), device_file);
Index: devicekit-disks-008/src/job-drive-poll.c
===================================================================
--- devicekit-disks-008.orig/src/job-drive-poll.c 2009-10-18 10:06:51.000000000 +0200
+++ devicekit-disks-008/src/job-drive-poll.c 2009-10-18 10:07:15.000000000 +0200
@@ -55,7 +55,7 @@ main (int argc, char *argv[])
device_file = argv[1];
/* the device file is the canonical device file from udev */
- is_cdrom = (g_str_has_prefix (device_file, "/dev/sr") || g_str_has_prefix (device_file, "/dev/scd"));
+ is_cdrom = (g_str_equal (device_file, "/dev/hdb") || g_str_has_prefix (device_file, "/dev/sr") || g_str_has_prefix (device_file, "/dev/scd"));
if (is_cdrom)
{
With this, the CD isn’t locked anymore and I can insert disks into it,
but it is still not usable by nautilus, which behaves as if no media was
introduced in the drive. After that my kernel logs are full of scary
error messages:
[ 1237.951631] hdb: command error: status=0x51 { DriveReady SeekComplete Error }
[ 1237.951647] hdb: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
[ 1237.951655] hdb: possibly failed opcode: 0xa0
[ 1238.189345] ATAPI device hdb:
[ 1238.189354] Error: Illegal request -- (Sense key=0x05)
[ 1238.189363] Illegal mode for this track or incompatible medium -- (asc=0x64, ascq=0x00)
[ 1238.189369] The failed "Read 10" packet command was:
[ 1238.189372] "28 00 00 05 60 54 00 00 01 00 00 00 00 00 00 00 "
[ 1238.189391] end_request: I/O error, dev hdb, sector 1409360
[ 1238.189400] Buffer I/O error on device hdb, logical block 352340
Cheers,
--
.''`. Josselin Mouette
: :' :
`. `' “I recommend you to learn English in hope that you in
`- future understand things” -- Jörg Schilling
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Ceci est une partie de message num?riquement sign?e
URL: <http://lists.alioth.debian.org/pipermail/pkg-utopia-maintainers/attachments/20091018/470d66fc/attachment.pgp>
More information about the Pkg-utopia-maintainers
mailing list