From owner-freebsd-questions Tue Feb 19 15:42: 5 2002 Delivered-To: freebsd-questions@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 629F237B405 for ; Tue, 19 Feb 2002 15:42:01 -0800 (PST) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 19 Feb 2002 23:42:00 +0000 (GMT) To: Balaji Cc: freebsd-questions@freebsd.org Subject: Re: Has anyone done VFS kernel programming here? In-Reply-To: Your message of "Mon, 18 Feb 2002 19:17:24 PST." <20020219031724.52482.qmail@web14913.mail.yahoo.com> Date: Tue, 19 Feb 2002 23:42:00 +0000 From: Ian Dowse Message-ID: <200202192342.aa66956@salmon.maths.tcd.ie> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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