From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 30 15:53:06 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 C8BE816A41F for ; Sat, 30 Jun 2007 15:53:06 +0000 (UTC) (envelope-from erenerdemli@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by mx1.freebsd.org (Postfix) with ESMTP id 88F1413C455 for ; Sat, 30 Jun 2007 15:53:06 +0000 (UTC) (envelope-from erenerdemli@gmail.com) Received: by py-out-1112.google.com with SMTP id u77so1946639pyb for ; Sat, 30 Jun 2007 08:53:06 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=CNjLfa4ibtKw3OE9Nd1hhsXapCpY/oglB2FUVrRmaQftwMnzEdT1v3b7vVuXtnIzGc1GzFftssMwPAl7u24T9LZ95objv6I6gxsiV1cswoUskHSnBZjs8Moytm76/D/FYOwGCqmydbpUHGHyUXxRofWskwPjGazsR6cunV+wAtc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=as+LwJU0ghKgcegdbVkxKdEkCQULXWTUnsthMqE6rYwNr2KXNjNItUH/iJQX3IZkyCwjbwAzjsEi39DctCVKWg9D5HGmNE8V3ldXlMlj6yDr8H1+VZIBJFuWIZbult3Sg9OJSvsuB+TYm78laMq8LefKv/IWrceGOUhrSAXdnTQ= Received: by 10.65.212.3 with SMTP id o3mr6848105qbq.1183217057615; Sat, 30 Jun 2007 08:24:17 -0700 (PDT) Received: by 10.64.193.7 with HTTP; Sat, 30 Jun 2007 08:24:17 -0700 (PDT) Message-ID: Date: Sat, 30 Jun 2007 15:24:17 +0000 From: "Eren Erdemli" To: freebsd-hackers@freebsd.org In-Reply-To: <20070629171137.GG1221@funkthat.com> MIME-Version: 1.0 References: <20070629171137.GG1221@funkthat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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 15:53:06 -0000 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()??????????? } the given path in the args is relative to the current path if not supplied fully. So who would I get the path of file. Your help is truly appreciated as I I have been trying it for few days now. no result apart from kernel panics. Thanks in advance Eren