X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fevent.c;h=ac4b0b4a365f7f493973f7389cd58f241c8292ae;hb=4222434939b65c3abf144866564732d7fd14ed13;hp=31c0c971572c8e57aefb49a57e1078b46d07ac76;hpb=10a8a2237343699e3923d87e24dbf2d7fe225377;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/event.c b/src/bin/lttng-sessiond/event.c index 31c0c9715..ac4b0b4a3 100644 --- a/src/bin/lttng-sessiond/event.c +++ b/src/bin/lttng-sessiond/event.c @@ -1,18 +1,18 @@ /* * Copyright (C) 2011 - David Goulet * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; only version 2 of the License. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, version 2 only, + * as published by the Free Software Foundation. * - * This program 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 General Public License for - * more details. + * This program 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 General Public License for more details. * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #define _GNU_SOURCE @@ -21,8 +21,8 @@ #include #include +#include #include -#include #include "channel.h" #include "event.h" @@ -147,7 +147,12 @@ int event_kernel_enable_tracepoint(struct ltt_kernel_session *ksession, ret = LTTCOMM_KERN_ENABLE_FAIL; goto end; } + } else { + /* At this point, the event is considered enabled */ + ret = LTTCOMM_KERN_EVENT_EXIST; + goto end; } + ret = LTTCOMM_OK; end: return ret; @@ -334,11 +339,13 @@ int event_ust_enable_all_tracepoints(struct ltt_ust_session *usess, int domain, free(events); break; } +#if 0 case LTTNG_DOMAIN_UST_EXEC_NAME: case LTTNG_DOMAIN_UST_PID: case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN: +#endif default: - ret = LTTCOMM_NOT_IMPLEMENTED; + ret = LTTCOMM_UND; goto error; } @@ -401,11 +408,13 @@ int event_ust_enable_tracepoint(struct ltt_ust_session *usess, int domain, } break; } +#if 0 case LTTNG_DOMAIN_UST_EXEC_NAME: case LTTNG_DOMAIN_UST_PID: case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN: +#endif default: - ret = LTTCOMM_NOT_IMPLEMENTED; + ret = LTTCOMM_UND; goto end; } @@ -468,11 +477,13 @@ int event_ust_disable_tracepoint(struct ltt_ust_session *usess, int domain, goto error; } break; +#if 0 case LTTNG_DOMAIN_UST_EXEC_NAME: case LTTNG_DOMAIN_UST_PID: case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN: +#endif default: - ret = LTTCOMM_NOT_IMPLEMENTED; + ret = LTTCOMM_UND; goto error; } @@ -539,11 +550,13 @@ int event_ust_disable_all_tracepoints(struct ltt_ust_session *usess, int domain, free(events); break; } +#if 0 case LTTNG_DOMAIN_UST_EXEC_NAME: case LTTNG_DOMAIN_UST_PID: case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN: +#endif default: - ret = LTTCOMM_NOT_IMPLEMENTED; + ret = LTTCOMM_UND; goto error; }