From owner-freebsd-current@FreeBSD.ORG Sat Jun 30 16:30:20 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5BA316A469 for ; Sat, 30 Jun 2007 16:30:20 +0000 (UTC) (envelope-from erenerdemli@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.freebsd.org (Postfix) with ESMTP id A6F4713C46C for ; Sat, 30 Jun 2007 16:30:20 +0000 (UTC) (envelope-from erenerdemli@gmail.com) Received: by py-out-1112.google.com with SMTP id u77so1962559pyb for ; Sat, 30 Jun 2007 09:30:20 -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:mime-version:content-type; b=lUeZT6OkVHgpTs8s6NAgqXmEnkxE3fVIVbyjUXVlRltN9AQcO5I2hJLuwmu6u/AT6Z3NdBY7qrmvQu4/ctky7jssxisDjBUCpXlhXwLoyeVp7MuRROc1Cl+vqoSPfVIWAbsTkLmv4ifhQGjbop87zmvy7MiWQYb9BjqOQAQov+4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=e746E5u52lfvhhmx185CbYIGwAUgcvncsZ6XoqS9tUlPbq1x/iGfLatu7KqF5zt2K293ph9UavuIvzT+Jz64brQSaDSoBOwxdJwkOokyuegQa907h0MfIE9qYp326ito2F7QIi0S0es9oFMxC2w2HX+isQBmBCshzL2sk4T/610= Received: by 10.65.218.15 with SMTP id v15mr4424138qbq.1183219378356; Sat, 30 Jun 2007 09:02:58 -0700 (PDT) Received: by 10.64.193.7 with HTTP; Sat, 30 Jun 2007 09:02:58 -0700 (PDT) Message-ID: Date: Sat, 30 Jun 2007 16:02:58 +0000 From: "Eren Erdemli" To: freebsd-current@freebsd.org MIME-Version: 1.0 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: getcwd in kernel space X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2007 16:30:21 -0000 Hi, Sorry to disturb you's but I have a question and would like to know if you can assist me. I tried posting it to freebsd-hacker mailing list however I think something is wrong with it. 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