From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 27 06:43:22 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 CDAA716A402 for ; Fri, 27 Apr 2007 06:43:22 +0000 (UTC) (envelope-from marc.loerner@hob.de) Received: from mailgate.hob.de (mailgate.hob.de [212.185.199.3]) by mx1.freebsd.org (Postfix) with ESMTP id 065B813C44C for ; Fri, 27 Apr 2007 06:43:21 +0000 (UTC) (envelope-from marc.loerner@hob.de) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.hob.de (Postfix) with ESMTP id 9B69F279DB; Fri, 27 Apr 2007 08:43:20 +0200 (CEST) Received: from mailgate.hob.de ([127.0.0.1]) by localhost (mailgate.hob.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20731-01; Fri, 27 Apr 2007 08:43:20 +0200 (CEST) Received: from imap.hob.de (mail2.hob.de [172.25.1.102]) by mailgate.hob.de (Postfix) with ESMTP id 573C9279E3; Fri, 27 Apr 2007 08:43:20 +0200 (CEST) Received: from linux03.hob.de (linux03.hob.de [172.22.0.190]) by imap.hob.de (Postfix on SuSE eMail Server 2.0) with ESMTP id D18C23C59; Fri, 27 Apr 2007 08:43:19 +0200 (CEST) From: Marc =?iso-8859-1?q?L=F6rner?= Organization: hob To: freebsd-hackers@freebsd.org Date: Fri, 27 Apr 2007 07:43:16 +0100 User-Agent: KMail/1.6.2 References: <200704261408.19885.marc.loerner@hob.de> <200704261349.35661.jhb@freebsd.org> In-Reply-To: <200704261349.35661.jhb@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Message-Id: <200704270843.16908.marc.loerner@hob.de> X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at hob.de Cc: Subject: Re: Usage of kern_* functions in kernel 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: Fri, 27 Apr 2007 06:43:22 -0000 On Thursday 26 April 2007 19:49, John Baldwin wrote: > On Thursday 26 April 2007 08:08:19 am Marc Lörner wrote: > > Hello, > > I googled but found nothing about the usage of the kern_* functions > > (kern_open, kern_close, kern_pwritev, kern_preadv) that are located in > > vfs_syscalls.c > > > > When I use kern_open to open a file within the kernel, I get an error. > > When I use the normal vn_open function instead, all works well. > > > > So my question is which functions are recommended by you kernel-hackers > > for use within kernelspace? > > > > And here a second question: Is it possible to open/use the console driver > > in kernelspace within the functions mentioned above? > > If not, can you give me some pointers on where I can find this > > information! > > kern_XXX are generally used by system calls such as alternative ABIs, etc. so, you would recommend using the vn_* functions instead? -- Marc