Re: Re: cdrom ioctls
"Peter T. Breuer" <[email protected]>
| Newsgroups | gmane.linux.enbd.general |
|---|---|
| Message-ID | <[email protected]> |
"Also sprach ptb:"
> "Also sprach Steven Hartley:"
> > I came across the same problem with the same IOCTL about 1-2 months ago
> > and decided to just hard code that that ioctl returned always (drive
> > ready), when I go back to the enbd project, I try our your code.
>
> Yes - I am kinda working on the code ...
I was able to do it. I used the "special" facility. It looks quite
generic. I've only tested type IOW and type IOR ioctls at this point,
but they seem to work...
In the main ioctl table in ioctl_table.h, you need
{ CDROM_DRIVE_STATUS, _NEW_IOWRS(CDROM_DRIVE_STATUS), },
(delegate to the special mechanism)
and in the special table at the end of the file
{ _NEW_IOWRS(CDROM_DRIVE_STATUS), _NEW_IOWT(CDROM_DRIVE_STATUS,int), },
(if it indeed writes an int directly, and assigns significance
to the return value).
Peter