Comment 36 for bug 356631

Andy Whitcroft (apw) wrote :

having had a look at cdrom_id it does appear at least to a cursory look that cdrom_id is interrogating the CD drive directly using raw SCSI commands over the sg interface. This implies at least that the drives in question are returnig the information you are producing directly. It is not 100% clear however that if the drive is empty that we should have got as far as we have through cdrom_id, ie. we might not have expected to have even requested this information:

        /* read drive and possibly current profile */
        if (cd_profiles(udev, fd) < 0)
                goto print;

        /* get session/track info */
        if (cd_media_toc(udev, fd) < 0)
                goto print;
* ->
        /* get writable media state */
        if (cd_media_info(udev, fd) < 0)
                goto print;

We might have expected the toc check to have failed and thus us to not have continued to get the media state. If we look at that code it also sends raw scsi commands. I suspect we are going to have to detect and work round this in userspace.