From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 30 18:13:17 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 5584216A46D for ; Sat, 30 Jun 2007 18:13:17 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 0E6C113C4AE for ; Sat, 30 Jun 2007 18:13:16 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 716F58BF127; Sat, 30 Jun 2007 20:13:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tgy9hila8euK; Sat, 30 Jun 2007 20:13:14 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 28E708BF0C3; Sat, 30 Jun 2007 20:13:14 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l5UIDDEe063285; Sat, 30 Jun 2007 20:13:13 +0200 (CEST) (envelope-from rdivacky) Date: Sat, 30 Jun 2007 20:13:13 +0200 From: Roman Divacky To: Eren Erdemli Message-ID: <20070630181313.GA63208@freebsd.org> References: <20070629171137.GG1221@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: getCWD in kernel space 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, 30 Jun 2007 18:13:17 -0000 On Sat, Jun 30, 2007 at 03:24:17PM +0000, Eren Erdemli wrote: > Hello hackers, > > Sorry to disturb you's but I have a question and would like to know if you > can assist me. > > I am new to freebsd programing and I am trying to get the current working > directory of the curthread. > > I have hook on to the sys calls and redirected the mkdir > > my_mkdir(struct thread *p, (void*) uap) > { > mkdir_args = ..................... > ........ > getCWD()??????????? > } curthread->td_proc->p_fd->fd_cdir is a vnode of cwd