From owner-freebsd-hackers Tue Jan 27 11:33:31 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA18617 for hackers-outgoing; Tue, 27 Jan 1998 11:33:31 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from wcc.wcc.net (wcc.wcc.net [208.6.232.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA18540; Tue, 27 Jan 1998 11:32:53 -0800 (PST) (envelope-from piquan@wcc.wcc.net) Received: from detlev.UUCP (ppp78.wcc.net [208.6.232.78]) by wcc.wcc.net (8.8.7/8.8.7) with ESMTP id NAA18855; Tue, 27 Jan 1998 13:29:02 -0600 (CST) Received: (from joelh@localhost) by detlev.UUCP (8.8.8/8.8.7) id NAA06176; Tue, 27 Jan 1998 13:31:54 -0600 (CST) (envelope-from joelh) Date: Tue, 27 Jan 1998 13:31:54 -0600 (CST) Message-Id: <199801271931.NAA06176@detlev.UUCP> To: dyson@FreeBSD.ORG CC: mike@smith.net.au, doconnor@cain.gsoft.com.au, mike@smith.net.au, dag-erli@ifi.uio.no, hackers@FreeBSD.ORG In-reply-to: <199801270720.CAA00625@dyson.iquest.net> Subject: Re: File I/O in kernel land (was: Re: 2nd warning: 2.2.6 BETA begins in 10 days!) From: Joel Ray Holveck Reply-to: joelh@gnu.org References: <199801270720.CAA00625@dyson.iquest.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk >> As Julian said, see how the code in the kernel handles reading executable >> images. It's moderately painful, but definitely the Right Way to do it. > You should refer to the code in -current, because the older stuff had some > problems. Also, you can do vn_open, vn_read, vn_write, > vn_close if you want to. There are the options to do I/O to/from system > space. The only reason (that I know of) that the exec code doesn't use > the vn_* calls is for efficiency reasons, so lots of stuff is bypassed > and done slightly VMish as opposed to file I/Oish. Gotcha. I'll go over that. > I don't have lots of time to tutor, but what you should be able to do is: I don't ask for tutoring, but being new to the FreeBSD kernel (not to mention relatively new to FreeBSD in general), I do need people to occasionally point me towards functions I can look into. > I know that it seems to be complicated, but not really worse than doing > I/O in user-land on VMS :-). That's actually considerably less complicated than I was anticipating. -- Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped