X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=lttng%2Futils.c;fp=lttng%2Futils.c;h=0000000000000000000000000000000000000000;hp=db7fd38fe6ee297fc2ec8b123a3fba1e3e52a3f3;hb=10a8a2237343699e3923d87e24dbf2d7fe225377;hpb=734f79bf717d87817623d382c59086dc9e8ef610 diff --git a/lttng/utils.c b/lttng/utils.c deleted file mode 100644 index db7fd38fe..000000000 --- a/lttng/utils.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include - -#include - -#include "conf.h" -#include "lttngerr.h" - -/* - * get_session_name - * - * Return allocated string with the session name found in the config - * directory. - */ -char *get_session_name(void) -{ - char *path, *session_name = NULL; - - /* Get path to config file */ - path = config_get_default_path(); - if (path == NULL) { - goto error; - } - - /* Get session name from config */ - session_name = config_read_session_name(path); - if (session_name == NULL) { - goto error; - } - -error: - DBG("Session name found: %s", session_name); - return session_name; -}