Re: multiple subdevice commands

On Wednesday 22 November 2006 08:23 am, Ian Abbott wrote:
> I'm wondering if it's theoretically possible to do this with a single
> device file and use some ioctl calls to choose which subdevices to hook
> the read and write operations to.  This would require some stuff to be
> moved into a "per file object" data structure that points to the main
> comedi device structure, so that one could open the main device file
> multiple times and tell each instance where to hook the read and write
> operations.  Sounds like a lot of work though. ;-)

There's already the beginnings of this in comedi_lseek.  I prefer having 
seperate subdevice files though, as it seems more in keeping with the 
principle of least surprise.

-- 
Frank

Received on 2006-11-22Z21:20:26