From owner-freebsd-net@FreeBSD.ORG Tue Dec 16 21:39:59 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08E3A1065678 for ; Tue, 16 Dec 2008 21:39:59 +0000 (UTC) (envelope-from prvs=julian=229da16c1@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id ED1548FC27 for ; Tue, 16 Dec 2008 21:39:58 +0000 (UTC) (envelope-from prvs=julian=229da16c1@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.27]) by smtp-outbound.ironport.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 16 Dec 2008 13:11:38 -0800 Message-ID: <49481985.3080101@elischer.org> Date: Tue, 16 Dec 2008 13:11:33 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Ferner Cilloniz References: <1229437998.4942.2.camel@mobiliare.Belkin> In-Reply-To: <1229437998.4942.2.camel@mobiliare.Belkin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: working directory within kernel code X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2008 21:39:59 -0000 Ferner Cilloniz wrote: > I am trying to determine the current working directory when a system > call is issued. im interested in determining this from a kernel module. > > however, because system calls are only given a thread* and a void*, > which gets casted, is there any way i find out the cwd? > > thanks. > (why 'net@' ?) (try hackers@) it depends if you want the NAME of the working directory or a pointer to it's vnode, (or something similar).