X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=lttng-syscalls.c;h=37feffbe43c1a90319c2ed2cef161b4e6f5ade74;hb=4798baec2eaada44be415af23c844d810b284c42;hp=521531c35bef2ab52529428de85499b592622936;hpb=a90917c3f8c4ed79117f1caa333b29a2108084ec;p=lttng-modules.git diff --git a/lttng-syscalls.c b/lttng-syscalls.c index 521531c3..37feffbe 100644 --- a/lttng-syscalls.c +++ b/lttng-syscalls.c @@ -1,11 +1,23 @@ /* * lttng-syscalls.c * - * Copyright 2010-2011 (c) - Mathieu Desnoyers - * * LTTng syscall probes. * - * Dual LGPL v2.1/GPL v2 license. + * Copyright (C) 2010-2012 Mathieu Desnoyers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; only + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include @@ -17,10 +29,9 @@ #include "lttng-events.h" #ifndef CONFIG_COMPAT -static inline int is_compat_task(void) -{ - return 0; -} +# ifndef is_compat_task +# define is_compat_task() (0) +# endif #endif static @@ -295,8 +306,8 @@ int fill_table(const struct trace_syscall_entry *table, size_t table_len, if (chan_table[i]) continue; memset(&ev, 0, sizeof(ev)); - strncpy(ev.name, desc->name, LTTNG_SYM_NAME_LEN); - ev.name[LTTNG_SYM_NAME_LEN - 1] = '\0'; + strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN); + ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0'; ev.instrumentation = LTTNG_KERNEL_NOOP; chan_table[i] = lttng_event_create(chan, &ev, filter, desc); @@ -342,8 +353,8 @@ int lttng_syscalls_register(struct lttng_channel *chan, void *filter) &__event_desc___sys_unknown; memset(&ev, 0, sizeof(ev)); - strncpy(ev.name, desc->name, LTTNG_SYM_NAME_LEN); - ev.name[LTTNG_SYM_NAME_LEN - 1] = '\0'; + strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN); + ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0'; ev.instrumentation = LTTNG_KERNEL_NOOP; chan->sc_unknown = lttng_event_create(chan, &ev, filter, desc); @@ -357,8 +368,8 @@ int lttng_syscalls_register(struct lttng_channel *chan, void *filter) &__event_desc___compat_sys_unknown; memset(&ev, 0, sizeof(ev)); - strncpy(ev.name, desc->name, LTTNG_SYM_NAME_LEN); - ev.name[LTTNG_SYM_NAME_LEN - 1] = '\0'; + strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN); + ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0'; ev.instrumentation = LTTNG_KERNEL_NOOP; chan->sc_compat_unknown = lttng_event_create(chan, &ev, filter, desc); @@ -372,8 +383,8 @@ int lttng_syscalls_register(struct lttng_channel *chan, void *filter) &__event_desc___exit_syscall; memset(&ev, 0, sizeof(ev)); - strncpy(ev.name, desc->name, LTTNG_SYM_NAME_LEN); - ev.name[LTTNG_SYM_NAME_LEN - 1] = '\0'; + strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN); + ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0'; ev.instrumentation = LTTNG_KERNEL_NOOP; chan->sc_exit = lttng_event_create(chan, &ev, filter, desc);