Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Dec 2008 19:41:14 -0800
From:      Alfred Perlstein <alfred@freebsd.org>
To:        Ferner Cilloniz <fernercc@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: working directory within kernel code
Message-ID:  <20081217034114.GU18389@elvis.mu.org>
In-Reply-To: <1229437998.4942.2.camel@mobiliare.Belkin>
References:  <1229437998.4942.2.camel@mobiliare.Belkin>

next in thread | previous in thread | raw e-mail | index | archive | help
* Ferner Cilloniz <fernercc@gmail.com> [081216 12:33] 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?

thread should point to proc which should have a "current dir" vnode
in it, or a pointer to a struct that has it... keep poking around.

-Alfred



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081217034114.GU18389>