Bug#218266: sound-juicer: Doesn't work with CDO_CHECK_TYPE

Juergen Kreileder Juergen Kreileder <jk@blackdown.de>, 218266@bugs.debian.org
Fri, 30 Apr 2004 02:35:31 +0200


Hi,

there are actually two locations where the cdrom device get's opened
without O_NONBLOCK:

1) In libmusicbrainz, see #246610.

2) In sound-juicer's cd-drive.c. Here's a patch:

--- src/cd-drive.c.orig 2004-04-13 11:57:21.000000000 +0200
+++ src/cd-drive.c      2004-04-30 02:31:31.000000000 +0200
@@ -260,7 +260,7 @@
        int fd;
        int mmc_profile;
 
-       fd = open (device, O_RDONLY|O_EXCL);
+       fd = open (device, O_RDONLY|O_EXCL|O_NONBLOCK);
        if (fd < 0) {
                if (errno == EBUSY) {
                        return CD_MEDIA_TYPE_BUSY;


With this patch and the one from #246610, sound-juicer works fine with
/proc/sys/dev/cdrom/check_media == 1.


        Juergen

-- 
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux/java2-status/