Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Aug 2006 09:26:43 +0530
From:      "Joseph Koshy" <joseph.koshy@gmail.com>
To:        "Kim Shrier" <kim@tinker.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: The proper way to open a file from inside the kernel
Message-ID:  <84dead720608232056o183976ffidc1c506434e754b9@mail.gmail.com>
In-Reply-To: <77B636A3-5AED-41E6-AB98-91178E1D10D8@tinker.com>
References:  <77B636A3-5AED-41E6-AB98-91178E1D10D8@tinker.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> I am experimenting with modifying a kernel module and I need
> to be able to open/read/write/close a file from within the
> module.  Is there a preferred way to do this?  Are there any
> locking or buffering issues that I need to be aware of?

sys/kern/kern_alq.c:alq_open() and sys/kern/kern_ktrace.c:ktrace()
have examples.

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



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