Opening and wriiting to file in Kern

Joseph Koshy joseph.koshy at gmail.com
Sun Feb 6 20:58:27 PST 2005


> If you mist do this, the general set of steps are:
> 
> 1. use namei() to convert a pathname to a vnode
> 2. Use vn_open(), vn_rdwr(), and vn_close() to operate on the vnode.
> 3. Observe proper vnode locking and reference counting with vref(),
> vn_lock(), and vput()

Take a look at "sys/kern/kern_ktrace.c" or "sys/kern/kern_alq.c" for a template.

-- 
FreeBSD Volunteer, http://people.freebsd.org/~jkoshy


More information about the freebsd-hackers mailing list