int setup_health_path(void)
{
int is_root, ret = 0;
- char *home_path = NULL, *rundir = NULL, *relayd_path = NULL;
+ const char *home_path = NULL;
+ char *rundir = NULL, *relayd_path = NULL;
ret = parse_health_env();
if (ret) {
struct lttng_trace_chunk *chunk = NULL;
enum lttng_trace_chunk_status status;
struct lttng_directory_handle output_directory;
- char *base_path = opt_output_path;
+ const char *base_path = opt_output_path;
if (base_path == NULL) {
/* No output path defined */
{
int ret;
char *traces_path = NULL;
- char *default_path;
+ const char *default_path;
default_path = utils_get_home_dir();
if (default_path == NULL) {
goto error;
}
} else {
- char *home_path = utils_get_home_dir();
+ const char *home_path = utils_get_home_dir();
if (!home_path) {
ERR("Can't get HOME directory for socket creation");
* On success, returns 0;
* on error, returns -1.
*/
-static int create_config_file(char *path)
+static int create_config_file(const char *path)
{
int ret;
FILE *fp;
*/
void config_destroy_default(void)
{
- char *path = utils_get_home_dir();
+ const char *path = utils_get_home_dir();
if (path == NULL) {
return;
}
int config_init(const char *session_name)
{
int ret;
- char *path;
+ const char *path;
path = utils_get_home_dir();
if (path == NULL) {
static
char *_get_session_name(int quiet)
{
- char *path, *session_name = NULL;
+ const char *path;
+ char *session_name = NULL;
/* Get path to config file */
path = utils_get_home_dir();
config_entry_handler_cb handler, void *user_data)
{
int ret = 0;
- char *path;
+ const char *path;
FILE *config_file = NULL;
struct handler_filter_args filter = { section, handler, user_data };
}
if (!path) {
- char *home_path;
+ const char *home_path;
const char *sys_path;
/* Try home path */
* Otherwise returns the value of HOME.
*/
LTTNG_HIDDEN
-char *utils_get_home_dir(void)
+const char *utils_get_home_dir(void)
{
char *val = NULL;
struct passwd *pwd;
int utils_parse_time_suffix(char const * const str, uint64_t * const time_us);
int utils_get_count_order_u32(uint32_t x);
int utils_get_count_order_u64(uint64_t x);
-char *utils_get_home_dir(void);
+const char *utils_get_home_dir(void);
char *utils_get_user_home_dir(uid_t uid);
size_t utils_get_current_time_str(const char *format, char *dst, size_t len);
int utils_get_group_id(const char *name, bool warn, gid_t *gid);