This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Heed help: Calling sys_getcwd to resolve relative pathnames from within systemtap


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]