Subject: Re: open(2) -> device open
To: Jay Parlar <email@example.com>
From: David Laight <firstname.lastname@example.org>
Date: 06/12/2003 13:56:13
On Thu, Jun 12, 2003 at 08:34:02AM -0400, Jay Parlar wrote:
> I'm currently trying to get familiar with parts of the NetBSD kernel, in
> particular, the path taken from calling open() in userland on "/dev/xyz " to
> arriving at the xyzopen() call in the device driver.
> I'm not having too much luck right now. I know enough to start with
> sys_open() and go from there, but I keep getting lost in the internals.
> Would anyone be able to point me in the direction of a document that details
> this path, or anything along those lines? Specifically, if someone could
> tell me where the function pointer is assigned the interface methods of the
> driver (i.e. the methods in cdevsw), and where the driver's open method is
> called (through the function pointer).
You could always use ddb, set a breakpoint on sys_open() and single
step through. You'll get to the driver fairly quickly...
David Laight: email@example.com