projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Overwrite the config file on create session
[lttng-tools.git]
/
lttng
/
conf.c
diff --git
a/lttng/conf.c
b/lttng/conf.c
index 1cf0907ad884bf204060e6bd6f8f7df79f7d0bb1..ac1c172964ca263029e0906e02c12e2fa1182bd7 100644
(file)
--- a/
lttng/conf.c
+++ b/
lttng/conf.c
@@
-109,14
+109,14
@@
static int create_config_dir(char *path)
/* Create session directory .lttng */
ret = mkdir(path, S_IRWXU | S_IRGRP | S_IXGRP);
if (ret < 0) {
/* Create session directory .lttng */
ret = mkdir(path, S_IRWXU | S_IRGRP | S_IXGRP);
if (ret < 0) {
- if (errno == EEXIST) {
- ERR("Session already exist at %s", path);
- } else {
+ if (errno != EEXIST) {
perror("mkdir config");
ERR("Couldn't init config directory at %s", path);
perror("mkdir config");
ERR("Couldn't init config directory at %s", path);
+ ret = -errno;
+ goto error;
+ } else {
+ ret = 0;
}
}
- ret = -errno;
- goto error;
}
error:
}
error:
@@
-173,11
+173,6
@@
void config_destroy(char *path)
perror("remove config file");
}
perror("remove config file");
}
- ret = rmdir(path);
- if (ret < 0) {
- perror("rmdir config dir");
- }
-
free(config_path);
}
free(config_path);
}
This page took
0.024861 seconds
and
5
git commands to generate.