X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fconf.c;fp=src%2Fbin%2Flttng%2Fconf.c;h=5a0da9d338feb6e3322965602f55386a87f301c2;hp=b6632fcb144c052fa0ef4a9652843a074abd64c7;hb=feb0f3e5900ff58202ea0c3f227de3c1b8291952;hpb=0c7bcad5eaa11b368460759fc87f949e8c56b98f diff --git a/src/bin/lttng/conf.c b/src/bin/lttng/conf.c index b6632fcb1..5a0da9d33 100644 --- a/src/bin/lttng/conf.c +++ b/src/bin/lttng/conf.c @@ -25,6 +25,7 @@ #include #include +#include #include "conf.h" @@ -122,14 +123,6 @@ end: return ret; } -/* - * Returns the HOME directory path. Caller MUST NOT free(3) the return pointer. - */ -char *config_get_default_path(void) -{ - return getenv("HOME"); -} - /* * Destroys directory config and file config. */ @@ -161,7 +154,7 @@ end: */ void config_destroy_default(void) { - char *path = config_get_default_path(); + char *path = utils_get_home_dir(); if (path == NULL) { return; } @@ -277,7 +270,7 @@ int config_init(char *session_name) int ret; char *path; - path = config_get_default_path(); + path = utils_get_home_dir(); if (path == NULL) { ret = -1; goto error;