X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=ltt-sessiond%2Futils.c;h=d099c08031abf96221ac3028f3048fe4cd6ff266;hb=242cd1874f3d8f678e795eea4d35552eff683ed8;hp=936d3e1b891034321e4f79c48b0ff2b14729d72e;hpb=8e68d1c8b15ef989f1abac8a241827013a5d4623;p=lttng-tools.git diff --git a/ltt-sessiond/utils.c b/ltt-sessiond/utils.c index 936d3e1b8..d099c0803 100644 --- a/ltt-sessiond/utils.c +++ b/ltt-sessiond/utils.c @@ -28,6 +28,22 @@ #include "utils.h" +/* + * get_home_dir + * + * Return pointer to home directory path using the env variable HOME. + * No home, NULL is returned. + */ +const char *get_home_dir(void) +{ + return ((const char *) getenv("HOME")); +} + +/* + * mkdir_recursive + * + * Create recursively directory using the FULL path. + */ int mkdir_recursive(const char *path, mode_t mode) { int ret;