Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Feb 2002 23:42:00 +0000
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        Balaji <balajibsd@yahoo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Has anyone done VFS kernel programming here? 
Message-ID:   <200202192342.aa66956@salmon.maths.tcd.ie>
In-Reply-To: Your message of "Mon, 18 Feb 2002 19:17:24 PST." <20020219031724.52482.qmail@web14913.mail.yahoo.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20020219031724.52482.qmail@web14913.mail.yahoo.com>, Balaji writes:
>Hello ppl,
>If anyone of u has done some kernel programming with respect to files
>in the User space..... Could u please tell me how to acquire the file
>structure for a file when you are given the pathname??? Even a uio and
>an iovec structure would suffice. Please this is very urgent..... I
>need a (struct file *) returned for a given file pathname.... Help me!!

I posted a simple example of reading files from kernel-space a while
ago. The message is at:

	http://docs.freebsd.org/cgi/getmsg.cgi?fetch=167944+0+archive/2001/freebsd-hackers/20010819.freebsd-hackers

But be warned: in most cases having the kernel read files directly
is completely the wrong way of doing things; it's much better for
a userland utility to pass the information into the kernel via an
ioctl() etc.

Ian

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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