-
- /*
- * Create rundir from home path. This will create something like
- * $HOME/.lttng
- */
- ret = asprintf(&rundir, DEFAULT_LTTNG_HOME_RUNDIR, home_path);
- if (ret < 0) {
- retval = -1;
- goto exit_init_data;
- }
-
- if (create_lttng_rundir(rundir)) {
- retval = -1;
- goto exit_init_data;
- }
-
- if (strlen(apps_unix_sock_path) == 0) {
- ret = snprintf(apps_unix_sock_path, PATH_MAX,
- DEFAULT_HOME_APPS_UNIX_SOCK,
- home_path);
- if (ret < 0) {
- retval = -1;
- goto exit_init_data;
- }
- }
-
- /* Set the cli tool unix socket path */
- if (strlen(client_unix_sock_path) == 0) {
- ret = snprintf(client_unix_sock_path, PATH_MAX,
- DEFAULT_HOME_CLIENT_UNIX_SOCK,
- home_path);
- if (ret < 0) {
- retval = -1;
- goto exit_init_data;
- }
- }
-
- /* Set global SHM for ust */
- if (strlen(wait_shm_path) == 0) {
- ret = snprintf(wait_shm_path, PATH_MAX,
- DEFAULT_HOME_APPS_WAIT_SHM_PATH,
- getuid());
- if (ret < 0) {
- retval = -1;
- goto exit_init_data;
- }
- }
-
- /* Set health check Unix path */
- if (strlen(health_unix_sock_path) == 0) {
- ret = snprintf(health_unix_sock_path,
- sizeof(health_unix_sock_path),
- DEFAULT_HOME_HEALTH_UNIX_SOCK,
- home_path);
- if (ret < 0) {
- retval = -1;
- goto exit_init_data;
- }
- }