lkml.org 
[lkml]   [2003]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ide cdrom sg like access / rpcmgr ?
On Wed, Nov 12 2003, Linus Torvalds wrote:
>
> On Wed, 12 Nov 2003, Jens Axboe wrote:
> >
> > To make the below work, all you probably need to do is change sgio() to
> > use CDROM_SEND_PACKET for instance. That'll work in 2.4 and 2.6. You
> > just need to fill a cdrom_generic_command and send it to the cdrom fd.
>
> Don't forget: you also need to open the device with "O_NONBLOCK", so as to
> not make the kernel try to figure out the media etc. Otherwise you can't
> do anything with media that the kernel can't figure out (ie empty media
> that hasn't been written to, or even no media at all).
>
> Depending on what your tool is for, this may or may not be a problem, of
> course. If you only want to send commands to a drive that already has a
> readable media in it, you can skip the O_NONBLOCK.

Yes of course, you are absolutely right.

--
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 13:58    [W:0.046 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site