diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2014-02-27 11:06:37 +0100 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-02-28 16:52:08 -0500 |
commit | e8f1205bbca83c977fb75e4e7898ba430f8fb95f (patch) | |
tree | 04dda4c06030a831b6f154a834c7a3752ad5b73e /src/cdrom_id/cdrom_id.c | |
parent | 93f976f5f6b859c42b60a027fe226a4df43da678 (diff) |
cdrom_id: use the old MMC fallback
https://bugzilla.redhat.com/show_bug.cgi?id=1038015
The problem seems to be that the your virtual DVD is emulating a really
old DVD device, and doing it kind of strangely.
> dracut:# /lib/udev/cdrom_id --debug /dev/sr0
> probing: '/dev/sr0'
> INQUIRY: [IMM ][Virtual CD/DVD ][0316]
> GET CONFIGURATION failed with SK=5h/ASC=24h/ACQ=00h
So your virtual drive rejects the GET CONFIGURATION command as illegal.
Other pre-MMC2 drives that don't accept this command usually return the
error
SK=5h,ASC=20h (invalid/unsupported command code), in which case cdrom_id
tries an older method, and then ID_CDROM_MEDIA_TRACK_COUNT_DATA gets set
and all the /dev/disk/by-label (etc) links get set up.
The virtual drive returns the error SK=5h,ASC=24h (invalid field in
Command Descriptor Block), which cdrom_id doesn't handle, so it gives up
and the links never get made.
The ideal solution would be to make the IMM to emulate a device that's
less than 15 years old, but I'm not going to hold my breath waiting for
that.
So probably cdrom_id should also use the old MMC fallback when the error
is SK=5h,ASC=24h, and then all of this would work as expected.
Suggested-by:Luca Miccini <lmiccini@redhat.com>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/cdrom_id/cdrom_id.c')
-rw-r--r-- | src/cdrom_id/cdrom_id.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cdrom_id/cdrom_id.c b/src/cdrom_id/cdrom_id.c index c5239d1fdf..5733ee4247 100644 --- a/src/cdrom_id/cdrom_id.c +++ b/src/cdrom_id/cdrom_id.c @@ -560,7 +560,7 @@ static int cd_profiles(struct udev *udev, int fd) if ((err != 0)) { info_scsi_cmd_err(udev, "GET CONFIGURATION", err); /* handle pre-MMC2 drives which do not support GET CONFIGURATION */ - if (SK(err) == 0x5 && ASC(err) == 0x20) { + if (SK(err) == 0x5 && (ASC(err) == 0x20 || ASC(err) == 0x24)) { log_debug("drive is pre-MMC2 and does not support 46h get configuration command"); log_debug("trying to work around the problem"); ret = cd_profiles_old_mmc(udev, fd); |