public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: PATCH (for 2.6.3-rc1) for cdrom driver dvd_read_struct
@ 2004-02-10 18:06 Stuart_Hayes
  2004-02-10 18:27 ` Matt Domsch
  0 siblings, 1 reply; 5+ messages in thread
From: Stuart_Hayes @ 2004-02-10 18:06 UTC (permalink / raw)
  To: axboe; +Cc: linux-kernel


At risk of sounding stupid, how can a user space program check the type of
media (DVD vs. CD) that's in the drive?  I think that's what magicdev is
trying to do.
Thanks
Stuart


-----Original Message-----
From: Jens Axboe [mailto:axboe@suse.de]
Sent: Tuesday, February 10, 2004 11:12 AM
To: Hayes, Stuart
Cc: linux-kernel@vger.kernel.org
Subject: Re: 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-02-11 23:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-10 18:06 PATCH (for 2.6.3-rc1) for cdrom driver dvd_read_struct Stuart_Hayes
2004-02-10 18:27 ` Matt Domsch
2004-02-10 23:26   ` Adam Kropelin
2004-02-11 12:10     ` Jens Axboe
2004-02-11 23:33       ` [FAQ-PATCH] OE-QuoteFix (Was: Re: PATCH (for 2.6.3-rc1) for cdrom driver dvd_read_struct) Adam Kropelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox