This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Global constants
On Mon, 2006-02-13 at 20:14 +0000, Mark McLoughlin wrote:
> > something like
> > %{ const_O_CREAT = O_CREAT; %}
> > instead of
> > O_CREAT = 64
>
> Absolutely, that was my first thought too ... unfortunately, the kernel
> headers don't seem to have all the values e.g. O_ASYNC is only available
> as FASYNC ... I didn't take it any further than thinking "uggh, that
> sucks", though :-)
I don't understand.
function get_o_creat:long() %{ THIS->__retvalue = O_CREAT; %}
probe begin {
printf("O_CREAT = %d\n", get_o_creat())
}
> stap -g creat.stp
O_CREAT = 64