X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fconf.c;h=5a0da9d338feb6e3322965602f55386a87f301c2;hb=748bde765422ca3b2868999cdc7cb5a2de6d5d0e;hp=b6632fcb144c052fa0ef4a9652843a074abd64c7;hpb=487b253b3ec9f187b4c1b425b246e8e74e5ac309;p=lttng-tools.git 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;