Subject: Re: Understanding foo_open, foo_read, etc.
To: Peter Seebach <>
From: Matt Thomas <>
List: tech-kern
Date: 08/29/2006 16:09:51
Peter Seebach wrote:
> In message <200608292244.SAA14727@Sparkle.Rodents.Montreal.QC.CA>, der Mouse wr
> ites:
>>> The obvious thing I was missing was [...], and the subtle thing I was
>>> missing was [...].
>> Ah.  Yes, given your current explanation, I can see how you could get
>> confused - and I think you have probably managed to get unconfused.
> Yup.
> So, that leads to the obvious question:  How easy is it to clone a device
> rather than a file in NetBSD?  Actually, looking at this, I may already have
> won; it looks as though, if I have relevant tags stored in the device's
> softc, I can just set the relevant parameters in the softc passed to
> dev_open, and the various other routines will be called with them accordingly,
> which may solve nearly all the problems I have to deal with, and let me
> leave most of the code alone.

Look at bpf. :)