X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fevent.c;h=ac4b0b4a365f7f493973f7389cd58f241c8292ae;hb=4222434939b65c3abf144866564732d7fd14ed13;hp=0a82372bd57fdddf0d34061d56bc697c70a911c9;hpb=d78d661021eb1c5761c631dbd525697769fe638b;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/event.c b/src/bin/lttng-sessiond/event.c index 0a82372bd..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 @@ -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; @@ -340,7 +345,7 @@ int event_ust_enable_all_tracepoints(struct ltt_ust_session *usess, int domain, case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN: #endif default: - ret = LTTCOMM_NOT_IMPLEMENTED; + ret = LTTCOMM_UND; goto error; } @@ -409,7 +414,7 @@ int event_ust_enable_tracepoint(struct ltt_ust_session *usess, int domain, case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN: #endif default: - ret = LTTCOMM_NOT_IMPLEMENTED; + ret = LTTCOMM_UND; goto end; } @@ -478,7 +483,7 @@ int event_ust_disable_tracepoint(struct ltt_ust_session *usess, int domain, case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN: #endif default: - ret = LTTCOMM_NOT_IMPLEMENTED; + ret = LTTCOMM_UND; goto error; } @@ -551,7 +556,7 @@ int event_ust_disable_all_tracepoints(struct ltt_ust_session *usess, int domain, case LTTNG_DOMAIN_UST_PID_FOLLOW_CHILDREN: #endif default: - ret = LTTCOMM_NOT_IMPLEMENTED; + ret = LTTCOMM_UND; goto error; }