* Andrew Gallatin <[EMAIL PROTECTED]> [010112 15:29] wrote:
> Julian Elischer writes:
> > >
> > > Isn't this gross? Is there a better way?
> > I think that the better way is to actually have each open have a
> > different minor number.
> > i.e. each process opens a different copy.
> > The way to achieve this best is with cloning devices.
> > apply within phk for more info :-)
> Does this mean that the processes can open /dev/foo0 twice and the
> driver sees a different minor number for each open? Or does it mean
> that the process has to open /dev/foo0 and /dev/foo1?
> If the former, that's awesome!... How do I use it?
Well you have to write it, but you basically have the open(2)
syscall path optionally return a seperate void * 'cookie' that you
must pass into all operations (fileops) on that file.
It's not a major rewrite of any code, you just need an extra
parameter per fileop and store it in the struct file.
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message