From owner-freebsd-hackers@FreeBSD.ORG Sat May 5 18:58:38 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04A1716A404 for ; Sat, 5 May 2007 18:58:38 +0000 (UTC) (envelope-from tanarri@geri.cc.fer.hr) Received: from ls405.t-com.hr (ls405.t-com.hr [195.29.150.135]) by mx1.freebsd.org (Postfix) with ESMTP id B0CC613C448 for ; Sat, 5 May 2007 18:58:37 +0000 (UTC) (envelope-from tanarri@geri.cc.fer.hr) Received: from ls242.t-com.hr (ls242.t-com.hr [195.29.150.134]) by ls405.t-com.hr (Postfix) with ESMTP id DDA6C143D55 for ; Sat, 5 May 2007 20:34:02 +0200 (CEST) Received: from ls242.t-com.hr (ls242.t-com.hr [127.0.0.1]) by ls242.t-com.hr (Qmlai) with ESMTP id D8910B08322 for ; Sat, 5 May 2007 20:34:02 +0200 (CEST) Received: from ls242.t-com.hr (ls242.t-com.hr [127.0.0.1]) by ls242.t-com.hr (Qmlai) with ESMTP id C1BC7B0831B for ; Sat, 5 May 2007 20:34:02 +0200 (CEST) X-Envelope-Sender-Info: m+GfN8OLZW/EElzKohn46Rop8Qz1vasQeWuw+FKf83H+QvwBQrubeLtcgBvpGdRw X-Envelope-Sender: tanarri@geri.cc.fer.hr Received: from [192.168.2.102] (78-0-90-245.adsl.net.t-com.hr [78.0.90.245])by ls242.t-com.hr (Qmali) with ESMTP id 921755BC1F9for ; Sat, 5 May 2007 20:34:02 +0200 (CEST) Message-ID: <463CCE1E.1080906@geri.cc.fer.hr> Date: Sat, 05 May 2007 20:34:06 +0200 From: Sonja Milicic User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.94.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-imss-version: 2.046 X-imss-result: Passed X-imss-scanInfo: M:P L:E SM:0 X-imss-tmaseResult: TT:0 TS:0.0000 TC:00 TRN:0 TV:3.6.1039(15156.003) X-imss-scores: Clean:6.95502 C:2 M:3 S:5 R:5 X-imss-settings: Baseline:1 C:1 M:1 S:1 R:1 (0.0000 0.0000) Subject: Writing to a file 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, 05 May 2007 18:58:38 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, I'm working on an IO logging utility for FreeBSD as my GSoC project, and I have some questions about writing a kernel functions that would open an existing or create a new file (with the file name as a parameter, returns a vnode * for the file) and write data to that file (with pointer to data as parameter). I've found some functions in existing code that do similar things and might help me understand how to solve my problem, but as there isn't much documentation out there I still don't understand a lot of things. So, could anyone please give me a detailed explanation of how to open a file in kernel and write to it - best data types to use, functions, what to look out for, maybe a link to tutorial or manual that deals with this (if such a thing exists), etc.? Thanks in advance, Sonja -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGPM4eLfhGYNm8UfsRAiHjAJ4rIhKj2IKpnFj50zSs3IpxymWOzACfcER5 enTeEvaD/syyRQZmtDmlDIU= =xH5D -----END PGP SIGNATURE-----