Using LTTNG_HOME environment variable if exists, with fallback to HOME
[lttng-tools.git] / src / bin / lttng-relayd / utils.c
index ad13d3277eb4106c7320bfbe3563d53ba57c1d72..392fab6a1b68bf6e25061bb6ec869e6738e67c8a 100644 (file)
 #include "lttng-relayd.h"
 #include "utils.h"
 
-/*
- * Returns the HOME directory path. Caller MUST NOT free(3) the return pointer.
- */
-static char *get_default_path(void)
-{
-       return getenv("HOME");
-}
-
 static char *create_output_path_auto(char *path_name)
 {
        int ret;
@@ -44,7 +36,7 @@ static char *create_output_path_auto(char *path_name)
        char *alloc_path = NULL;
        char *default_path;
 
-       default_path = get_default_path();
+       default_path = utils_get_home_dir();
        if (default_path == NULL) {
                ERR("Home path not found.\n \
                                Please specify an output path using -o, --output PATH");
This page took 0.023495 seconds and 4 git commands to generate.