This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Heed help: Calling sys_getcwd to resolve relative pathnames from within systemtap
- From: Sebastian Pipping <sebastian at pipping dot org>
- To: systemtap at sourceware dot org
- Date: Mon, 03 Oct 2011 18:13:13 +0200
- Subject: Re: Heed help: Calling sys_getcwd to resolve relative pathnames from within systemtap
- References: <4E83BC3B.4080801@pipping.org> <4E85130A.5040207@redhat.com>
On 09/30/2011 02:53 AM, Josh Stone wrote:
> probe kernel.function("do_filp_open").return {
> if (errno_p($return)) {
> printf("%5d %5d %-16s %s %s\n",
> pid(), tid(), execname(), errno_str($return),
> kernel_string($pathname))
> } else {
> file = task_dentry_path(task_current(),
> $return->f_path->dentry,
> $return->f_path->mnt)
> printf("%5d %5d %-16s opened %s\n",
> pid(), tid(), execname(), file)
> }
> }
PS: Can you state that abive code is licensed "GPL v2 or later"?
Right now it doesn't come with a license so publishing anything that
makes use of it would be rather difficult. Thanks!
Best,
Sebastian