Reportedly, some "when I'm grown up I want to be a CD drive" fake USB CD sticks
like the IronKey neither support the SCSI "GET CONFIGURATION" nor the older
(pre-MMC2) "READ DISC INFORMATION" command. In that case, check if
cd_media_compat() detected that there is a disc present, and assume that we
have a CD-ROM medium.
err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header));
if ((err != 0)) {
info_scsi_cmd_err(udev, "READ DISC INFORMATION", err);
- info(udev, "no current profile, assuming no media\n");
- return -1;
+ if (cd_media == 1) {
+ info(udev, "no current profile, but disc is present; assuming CD-ROM\n");
+ cd_media_cd_rom = 1;
+ return 0;
+ } else {
+ info(udev, "no current profile, assuming no media\n");
+ return -1;
+ }
};
cd_media = 1;