lkml.org 
[lkml]   [2004]   [Feb]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 10 Feb 2004 18:12:15 +0100
FromJens Axboe <>
SubjectRe: PATCH (for 2.6.3-rc1) for cdrom driver dvd_read_struct
On Tue, Feb 10 2004, Stuart Hayes wrote:
> The attached patch will make the "dvd_read_struct" function in cdrom.c 
> check that the DVD drive can currently do the DVD read structure command 
> before sending the command to the drive.  It does this by checking the 
> "dvd read" feature using the "get configuration" command.
> 
> Currently, cdrom.c only checks that the drive is a DVD drive before 
> allowing the dvd read structure command to go to the drive--it does not 
> make sure that the DVD drive has a DVD in it.  Without this patch, if CD 
> medium is in a DVD drive, and the DVD_READ_STRUCT ioctl is used, the drive
> will spew an ugly "illegal request" error (magicdev does this).

I'm rather anxious about applying anything like this, in my experience
it's much much safer to simply let the command fail. I don't see
anything technically wrong with your approach, I'd just like it tested
on 100 different dvd drives :)

magicdev should be checking the media type itself first.

-- 
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [from the cache]
©2003-2008