projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: PERROR spam when `tracing` group does not exist
[lttng-tools.git]
/
src
/
common
/
utils.c
diff --git
a/src/common/utils.c
b/src/common/utils.c
index 17a313ee16f66efe8c574ddfddc8f94f156b9e11..02eddfae4a0c93d044aaad23c75a436ce76bf4a3 100644
(file)
--- a/
src/common/utils.c
+++ b/
src/common/utils.c
@@
-300,7
+300,7
@@
int expand_double_slashes_dot_and_dotdot(char *path)
* Copy the current token which is neither a '.' nor a '..'.
*/
path[expanded_path_len++] = '/';
* Copy the current token which is neither a '.' nor a '..'.
*/
path[expanded_path_len++] = '/';
- mem
cpy
(&path[expanded_path_len], curr_char, curr_token_len);
+ mem
move
(&path[expanded_path_len], curr_char, curr_token_len);
expanded_path_len += curr_token_len;
}
expanded_path_len += curr_token_len;
}
@@
-547,6
+547,7
@@
void utils_close_pipe(int *src)
if (ret) {
PERROR("close pipe");
}
if (ret) {
PERROR("close pipe");
}
+ src[i] = -1;
}
}
}
}
@@
-742,7
+743,8
@@
int utils_stream_file_path(const char *path_name, const char *file_name,
char count_str[MAX_INT_DEC_LEN(count) + 1] = {};
const char *path_separator;
char count_str[MAX_INT_DEC_LEN(count) + 1] = {};
const char *path_separator;
- if (path_name && path_name[strlen(path_name) - 1] == '/') {
+ if (path_name && (path_name[0] == '\0' ||
+ path_name[strlen(path_name) - 1] == '/')) {
path_separator = "";
} else {
path_separator = "/";
path_separator = "";
} else {
path_separator = "/";
@@
-1276,8
+1278,14
@@
int utils_get_group_id(const char *name, bool warn, gid_t *gid)
}
}
if (ret) {
}
}
if (ret) {
- PERROR("Failed to get group file entry for group name \"%s\"",
- name);
+ if (ret == ESRCH) {
+ DBG("Could not find group file entry for group name '%s'",
+ name);
+ } else {
+ PERROR("Failed to get group file entry for group name '%s'",
+ name);
+ }
+
ret = -1;
goto error;
}
ret = -1;
goto error;
}
This page took
0.025109 seconds
and
4
git commands to generate.