Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Sep 2005 01:44:33 -0500
From:      Jeb Campbell <jebc@c4solutions.net>
To:        freebsd-fs@freebsd.org
Subject:   kernel newb -- read/write to a local file from in kernel
Message-ID:  <431BE951.4070101@c4solutions.net>

next in thread | raw e-mail | index | archive | help
I'm trying to learn about kernel programming and as a weekend project 
I've started writing a Netgraph to file/dev module.

The Netgraph stuff was pretty easy, but I'm at a loss on the file access 
part as I've never done anything in-kernel.

After much searching (most of it not knowing what I was looking for), I 
think that I'm looking for something like "Vnode interface mechanics, 
write to a local file" as taught in Mr. McKusick's "FreeBSD Kernel 
Internals: An Intensive Code Walkthrough".

I've looked at nullfs/null_vnops.c, but I think that is more of a 
pass-through example.  Does anyone know of any online code that shows 
the process of opening a file/device for read/write?

Thanks in advance if someone has any tips or more info.

(and sorry to bother the kernel hackers with such a newbie question)

-- 
Jeb Campbell
jeb@c4solutions.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?431BE951.4070101>