projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: sessiond: NULL thread_state provided to pthread_cleanup callback
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
enable_events.c
diff --git
a/src/bin/lttng/commands/enable_events.c
b/src/bin/lttng/commands/enable_events.c
index 41be3a5a03fbd5476732657e35b46769b347c02d..6889b63d73eb12cacc8db055c4bd0d2a0bcc1fd1 100644
(file)
--- a/
src/bin/lttng/commands/enable_events.c
+++ b/
src/bin/lttng/commands/enable_events.c
@@
-305,12
+305,10
@@
end:
*/
static int warn_userspace_probe_syntax(const char *symbol)
{
*/
static int warn_userspace_probe_syntax(const char *symbol)
{
- unsigned long addr = 0;
- size_t offset = 0;
int ret;
/* Check if the symbol field is an hex address. */
int ret;
/* Check if the symbol field is an hex address. */
- ret = sscanf(symbol, "0x%
lx", &addr
);
+ ret = sscanf(symbol, "0x%
*x"
);
if (ret > 0) {
/* If there is a match, print a warning and return an error. */
ERR("Userspace probe on address not supported yet.");
if (ret > 0) {
/* If there is a match, print a warning and return an error. */
ERR("Userspace probe on address not supported yet.");
@@
-319,7
+317,7
@@
static int warn_userspace_probe_syntax(const char *symbol)
}
/* Check if the symbol field is an decimal address. */
}
/* Check if the symbol field is an decimal address. */
- ret = sscanf(symbol, "%
lu", &addr
);
+ ret = sscanf(symbol, "%
*u"
);
if (ret > 0) {
/* If there is a match, print a warning and return an error. */
ERR("Userspace probe on address not supported yet.");
if (ret > 0) {
/* If there is a match, print a warning and return an error. */
ERR("Userspace probe on address not supported yet.");
@@
-328,7
+326,7
@@
static int warn_userspace_probe_syntax(const char *symbol)
}
/* Check if the symbol field is symbol+hex_offset. */
}
/* Check if the symbol field is symbol+hex_offset. */
- ret = sscanf(symbol, "%*[^+]+0x%
lx", &offset
);
+ ret = sscanf(symbol, "%*[^+]+0x%
*x"
);
if (ret > 0) {
/* If there is a match, print a warning and return an error. */
ERR("Userspace probe on symbol+offset not supported yet.");
if (ret > 0) {
/* If there is a match, print a warning and return an error. */
ERR("Userspace probe on symbol+offset not supported yet.");
@@
-337,7
+335,7
@@
static int warn_userspace_probe_syntax(const char *symbol)
}
/* Check if the symbol field is symbol+decimal_offset. */
}
/* Check if the symbol field is symbol+decimal_offset. */
- ret = sscanf(symbol, "%*[^+]+%
lu", &offset
);
+ ret = sscanf(symbol, "%*[^+]+%
*u"
);
if (ret > 0) {
/* If there is a match, print a warning and return an error. */
ERR("Userspace probe on symbol+offset not supported yet.");
if (ret > 0) {
/* If there is a match, print a warning and return an error. */
ERR("Userspace probe on symbol+offset not supported yet.");
@@
-437,7
+435,7
@@
static int parse_userspace_probe_opts(struct lttng_event *ev, char *opt)
lookup_method =
lttng_userspace_probe_location_lookup_method_tracepoint_sdt_create();
if (!lookup_method) {
lookup_method =
lttng_userspace_probe_location_lookup_method_tracepoint_sdt_create();
if (!lookup_method) {
- WARN("Failed to create
ELF
lookup method");
+ WARN("Failed to create
SDT
lookup method");
ret = CMD_ERROR;
goto end_string;
}
ret = CMD_ERROR;
goto end_string;
}
@@
-486,11
+484,12
@@
static int parse_userspace_probe_opts(struct lttng_event *ev, char *opt)
}
/*
}
/*
- * Check if the file exists using access(2)
. If it does not, walk the
- *
$PATH
.
+ * Check if the file exists using access(2)
, If it does not,
+ *
return an error
.
*/
ret = access(real_target_path, F_OK);
if (ret) {
*/
ret = access(real_target_path, F_OK);
if (ret) {
+ ERR("Cannot find binary at path: %s.", real_target_path);
ret = CMD_ERROR;
goto end_destroy_lookup_method;
}
ret = CMD_ERROR;
goto end_destroy_lookup_method;
}
@@
-806,7
+805,7
@@
char *print_exclusions(char **names)
{
int length = 0;
int i;
{
int length = 0;
int i;
- const char
*preamble
= " excluding ";
+ const char
preamble[]
= " excluding ";
char *ret;
int count = names ? strutils_array_of_strings_len(names) : 0;
char *ret;
int count = names ? strutils_array_of_strings_len(names) : 0;
@@
-819,9
+818,8
@@
char *print_exclusions(char **names)
length += strlen(names[i]) + 4;
}
length += strlen(names[i]) + 4;
}
- /* add length of preamble + one for NUL - one for last (missing) comma */
- length += strlen(preamble);
- ret = zmalloc(length + 1);
+ length += sizeof(preamble);
+ ret = zmalloc(length);
if (!ret) {
return NULL;
}
if (!ret) {
return NULL;
}
This page took
0.028816 seconds
and
4
git commands to generate.