From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 25 17:59:05 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C724216A41C; Sat, 25 Jun 2005 17:59:05 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.village.org (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D43643D49; Sat, 25 Jun 2005 17:59:05 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1]) by harmony.village.org (8.13.3/8.13.3) with ESMTP id j5PHuDXH001596; Sat, 25 Jun 2005 11:56:13 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 25 Jun 2005 11:57:47 -0600 (MDT) Message-Id: <20050625.115747.127180168.imp@bsdimp.com> To: ssouhlal@freebsd.org From: "M. Warner Losh" In-Reply-To: <42F160E7-9B19-4A8A-8656-A86E0076EBB3@FreeBSD.org> References: <200506251203.13569.sebastien.b@swissinfo.org> <42F160E7-9B19-4A8A-8656-A86E0076EBB3@FreeBSD.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, sebastien.b@swissinfo.org Subject: Re: Accessing filesystem from a KLD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jun 2005 17:59:05 -0000 In message: <42F160E7-9B19-4A8A-8656-A86E0076EBB3@FreeBSD.org> Suleiman Souhlal writes: : You can use vn_open() to open the file, and then read it using vn_rdwr : (), and finally, vn_close() to close it. Look at src/sys/kern/ : link_elf_obj.c for an example. There's also a desire to provide an easier to use interface for drivers to load, for example, firmware. Warner