Date: Thu, 17 Jul 2008 09:06:26 +0200 From: "=?ISO-8859-1?Q?Fernando_Apestegu=EDa?=" <fernando.apesteguia@gmail.com> To: "=?ISO-8859-1?Q?Marc_L=F6rner?=" <marc.loerner@hob.de> Cc: freebsd-hackers@freebsd.org Subject: Re: reading a file in kernelmode Message-ID: <1bd550a00807170006m2c5f0be5u24ebe34df74a38ac@mail.gmail.com> In-Reply-To: <200807170829.55210.marc.loerner@hob.de> References: <002d01c8e79e$200078d0$60016a70$@de> <200807170829.55210.marc.loerner@hob.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On 7/17/08, Marc L=F6rner <marc.loerner@hob.de> wrote: > 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. Hi, I'm just curious, is it proper to read a file from kernel space? Is it something the kernel is supposed to do? Thanks in advance. > > HTH, > Marc > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1bd550a00807170006m2c5f0be5u24ebe34df74a38ac>