X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fenable_events.c;h=b4e6320c52a84619888b344b7037107c1aed8fc2;hp=41be3a5a03fbd5476732657e35b46769b347c02d;hb=639d282331816915ccddab7a0b52d0996db99317;hpb=36aa2f64f75a08a3f933197d5d464e6a31e865f7 diff --git a/src/bin/lttng/commands/enable_events.c b/src/bin/lttng/commands/enable_events.c index 41be3a5a0..b4e6320c5 100644 --- 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) { - unsigned long addr = 0; - size_t offset = 0; 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."); @@ -319,7 +317,7 @@ static int warn_userspace_probe_syntax(const char *symbol) } /* 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."); @@ -328,7 +326,7 @@ static int warn_userspace_probe_syntax(const char *symbol) } /* 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."); @@ -337,7 +335,7 @@ static int warn_userspace_probe_syntax(const char *symbol) } /* 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."); @@ -491,6 +489,7 @@ static int parse_userspace_probe_opts(struct lttng_event *ev, char *opt) */ 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; }