[dtrace-discuss] Re: How to get absolute path?

Sivakumar.Shanmugasundaram at Sun.COM Sivakumar.Shanmugasundaram at Sun.COM
Wed Dec 13 03:36:21 PST 2006


Partha,

This seems to work (just changed John Haslam's code a bit for the 
'remove' part).


fbt::fop_remove:entry
/strstr(stringof(args[0]->v_path), "/home") != NULL/
{
        self->dir = stringof(args[0]->v_path);
        self->file = stringof(args[1]);
}

fbt::fop_remove:return
/self->file != NULL/
{
        printf("U %s/%s\n", self->dir, self->file);
        self->file = 0;
        self->dir = 0;
}


Thanks
Siva


Parthasarathy J wrote:
> Dear Jhaslam,
> 
> Thanks for your mail. The script works fine for Open,write - syscall entries, but unlink/remove entry is not working as expected.
> Please do let me know regarding the same.
> 
> 
> Thanks,
> Partha
>  
>  
> This message posted from opensolaris.org
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org


More information about the dtrace-discuss mailing list