Lack of system_utsname in recent kernels may prevent some systemtap programs from compiling

Wenji Huang wenji.huang@oracle.com
Mon Dec 3 02:06:00 GMT 2007


Marcin Krol wrote:

> Hello everyone,
>
> I just realized I should rather correct this example from tutorial, 
> since linux/utsname.h has changed.
>
> However, I still don't get why I can't compile this updated example, 
> since /usr/include/linux/utsname.h does include relevant structures:
>
> struct new_utsname {
>        char sysname[65];
>        char nodename[65];
>        char release[65];
>        char version[65];
>        char machine[65];
>        char domainname[65];
> };
>
>
> % cat embed-C.stp
> %{
> #include <linux/utsname.h>
> %}
> function utsname:string (field:long)
> %{
>  if (down_read_trylock (& uts_sem))
>    {
>      const char *f =
>         (THIS->field == 0 ? new_utsname.sysname :


seems to be init_uts_ns.name.xxx? I tried that OK in 2.6.24-rc3.

Regards,
Wenji



More information about the Systemtap mailing list