X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=liblttngctl%2Fliblttngctl.c;h=6df82c4833086c851d284254f446fbaef06954f7;hp=38c9945b9e8ab25191b4523b4aa8db9c718cf635;hb=059008c7017e1148c77e4ec7050227f80300c5bd;hpb=7d29a2477524f7ee2ee46a94e538e6141f5ecc0e diff --git a/liblttngctl/liblttngctl.c b/liblttngctl/liblttngctl.c index 38c9945b9..6df82c483 100644 --- a/liblttngctl/liblttngctl.c +++ b/liblttngctl/liblttngctl.c @@ -1,19 +1,23 @@ /* + * liblttngctl.c + * + * Linux Trace Toolkit Control Library + * * 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; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * 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 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. + * 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 */ #define _GNU_SOURCE @@ -268,7 +272,7 @@ end: /* * Start tracing for all trace of the session. */ -int lttng_start_tracing(char *session_name) +int lttng_start_tracing(const char *session_name) { strncpy(lsm.session_name, session_name, NAME_MAX); return ask_sessiond(LTTNG_START_TRACE, NULL); @@ -277,7 +281,7 @@ int lttng_start_tracing(char *session_name) /* * Stop tracing for all trace of the session. */ -int lttng_stop_tracing(char *session_name) +int lttng_stop_tracing(const char *session_name) { strncpy(lsm.session_name, session_name, NAME_MAX); return ask_sessiond(LTTNG_STOP_TRACE, NULL); @@ -287,8 +291,8 @@ int lttng_stop_tracing(char *session_name) * lttng_add_context */ int lttng_add_context(struct lttng_domain *domain, - struct lttng_event_context *ctx, char *event_name, char *channel_name) - + struct lttng_event_context *ctx, const char *event_name, + const char *channel_name) { int ret; @@ -321,7 +325,7 @@ int lttng_add_context(struct lttng_domain *domain, * lttng_enable_event */ int lttng_enable_event(struct lttng_domain *domain, - struct lttng_event *ev, char *channel_name) + struct lttng_event *ev, const char *channel_name) { int ret; @@ -354,8 +358,8 @@ int lttng_enable_event(struct lttng_domain *domain, /* * Disable an event in the kernel tracer. */ -int lttng_disable_event(struct lttng_domain *domain, char *name, - char *channel_name) +int lttng_disable_event(struct lttng_domain *domain, const char *name, + const char *channel_name) { int ret; @@ -388,7 +392,8 @@ int lttng_disable_event(struct lttng_domain *domain, char *name, /* * Enable recording for a channel for the kernel tracer. */ -int lttng_enable_channel(struct lttng_domain *domain, struct lttng_channel *chan) +int lttng_enable_channel(struct lttng_domain *domain, + struct lttng_channel *chan) { int ret; @@ -412,7 +417,7 @@ int lttng_enable_channel(struct lttng_domain *domain, struct lttng_channel *chan /* * Disable recording for the channel for the kernel tracer. */ -int lttng_disable_channel(struct lttng_domain *domain, char *name) +int lttng_disable_channel(struct lttng_domain *domain, const char *name) { int ret; @@ -473,7 +478,7 @@ const char *lttng_get_readable_code(int code) /* * Create a brand new session using name. */ -int lttng_create_session(char *name, char *path) +int lttng_create_session(const char *name, const char *path) { strncpy(lsm.session_name, name, NAME_MAX); strncpy(lsm.path, path, PATH_MAX); @@ -483,7 +488,7 @@ int lttng_create_session(char *name, char *path) /* * Destroy session using name. */ -int lttng_destroy_session(char *name) +int lttng_destroy_session(const char *name) { strncpy(lsm.session_name, name, NAME_MAX); return ask_sessiond(LTTNG_DESTROY_SESSION, NULL); @@ -510,7 +515,7 @@ int lttng_list_sessions(struct lttng_session **sessions) /* * Set session name for the current lsm. */ -void lttng_set_session_name(char *name) +void lttng_set_session_name(const char *name) { strncpy(lsm.session_name, name, NAME_MAX); }