Date: Thu, 17 Jul 2008 08:29:54 +0200 From: Marc =?iso-8859-1?q?L=F6rner?= <marc.loerner@hob.de> To: freebsd-hackers@freebsd.org Subject: Re: reading a file in kernelmode Message-ID: <200807170829.55210.marc.loerner@hob.de> In-Reply-To: <002d01c8e79e$200078d0$60016a70$@de> References: <002d01c8e79e$200078d0$60016a70$@de>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello David! On Thursday 17 July 2008 01:46, David wrote: > Hello, > > > > I'm developing a FreeBSD kernel module and I'm searching for a good > solution to open/read/close a file. > > My goal is to generate a MD5-Hash of a given file (path). > > > > Open-Syscall seems to be improper. > > > > Any ideas/solutions/examples? > Look at file kern/kern_ktrace.c at the use of vn_open in function ktrace(td, uap) and VOP_WRITE in function ktr_writerequest(struct thread *td, struct ktr_request *req) I think reading is done quite analogue to writing in case above. HTH, Marc
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807170829.55210.marc.loerner>