kernel newb -- read/write to a local file from in kernel
Stanislav Sedov
stas at core.310.ru
Mon Sep 5 08:58:26 PDT 2005
On Mon, Sep 05, 2005 at 01:44:33AM -0500, Jeb Campbell wrote:
> 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 at c4solutions.net
>
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
>
>
Look throgh md(4) driver source (/sys/dev/md) - it is a good example.
More information about the freebsd-fs
mailing list