Change configuration file and trace output dir
[lttng-tools.git] / lttng / utils.c
index 109532a4f60da1d94cf11ec5b907fc49ea68d2ca..2cb77568e339433062408f8c69a8f3fac072fd98 100644 (file)
 
 #include "conf.h"
 
-/*
- *  get_config_file_path
- *
- *  Return absolute path to the configuration file.
- */
-char *get_config_file_path(void)
-{
-       char *alloc_path, *path = NULL;
-
-       /* Get path to config directory */
-       alloc_path = config_get_default_path();
-       if (alloc_path == NULL) {
-               goto error;
-       }
-
-       /* Get path to config file */
-       path = config_generate_dir_path(alloc_path);
-       if (path == NULL) {
-               goto free_alloc_path;
-       }
-
-free_alloc_path:
-       free(alloc_path);
-error:
-       return path;
-}
-
 /*
  *  get_session_name
  *
@@ -60,7 +33,7 @@ char *get_session_name(void)
        char *path, *session_name = NULL;
 
        /* Get path to config file */
-       path = get_config_file_path();
+       path = config_get_default_path();
        if (path == NULL) {
                goto error;
        }
@@ -68,11 +41,9 @@ char *get_session_name(void)
        /* Get session name from config */
        session_name = config_read_session_name(path);
        if (session_name == NULL) {
-               goto free_path;
+               goto error;
        }
 
-free_path:
-       free(path);
 error:
        return session_name;
 }
This page took 0.023213 seconds and 4 git commands to generate.