projects
/
lttng-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e0ac66
)
Overwrite the config file on create session
author
David Goulet
<david.goulet@polymtl.ca>
Thu, 30 Jun 2011 20:39:33 +0000
(16:39 -0400)
committer
David Goulet
<david.goulet@polymtl.ca>
Thu, 30 Jun 2011 20:39:33 +0000
(16:39 -0400)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
lttng/conf.c
patch
|
blob
|
blame
|
history
diff --git
a/lttng/conf.c
b/lttng/conf.c
index 57aaf7b2ddd5d726b70cf1b27a60f6f2eebcbe13..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) {
- 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);
+ ret = -errno;
+ goto error;
+ } else {
+ ret = 0;
}
- ret = -errno;
- goto error;
}
error:
This page took
0.026186 seconds
and
4
git commands to generate.