diff options
author | Liming Wang <liming.wang@windriver.com> | 2009-12-02 03:42:54 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-02 04:12:16 -0500 |
commit | 93aaa45a6ad3f983180223601fc663cc551ad499 (patch) | |
tree | 0f4f166ec58dea57930c0026430ca45cbe4fdf0c /tools/perf | |
parent | 1cedae72904b85462082dbcfd5190309ba37f8bd (diff) |
perf tools: Replace %m with %a in sscanf
Not all glibc support %m and it results in a compile error if
%m not supported. Replace it with %a and (float *) casts.
Signed-off-by: Liming Wang <liming.wang@windriver.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: peterz@infradead.org
Cc: mhiramat@redhat.com
LKML-Reference: <1259743374-9950-1-git-send-email-liming.wang@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/probe-event.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index e42f3acc9a7e..cd7fbda5e2a5 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c | |||
@@ -199,8 +199,8 @@ void parse_trace_kprobe_event(const char *str, char **group, char **event, | |||
199 | semantic_error("Too less arguments."); | 199 | semantic_error("Too less arguments."); |
200 | 200 | ||
201 | /* Scan event and group name. */ | 201 | /* Scan event and group name. */ |
202 | ret = sscanf(argv[0], "%c:%m[^/ \t]/%m[^ \t]", | 202 | ret = sscanf(argv[0], "%c:%a[^/ \t]/%a[^ \t]", |
203 | &pr, group, event); | 203 | &pr, (float *)(void *)group, (float *)(void *)event); |
204 | if (ret != 3) | 204 | if (ret != 3) |
205 | semantic_error("Failed to parse event name: %s", argv[0]); | 205 | semantic_error("Failed to parse event name: %s", argv[0]); |
206 | pr_debug("Group:%s Event:%s probe:%c\n", *group, *event, pr); | 206 | pr_debug("Group:%s Event:%s probe:%c\n", *group, *event, pr); |
@@ -211,7 +211,7 @@ void parse_trace_kprobe_event(const char *str, char **group, char **event, | |||
211 | pp->retprobe = (pr == 'r'); | 211 | pp->retprobe = (pr == 'r'); |
212 | 212 | ||
213 | /* Scan function name and offset */ | 213 | /* Scan function name and offset */ |
214 | ret = sscanf(argv[1], "%m[^+]+%d", &pp->function, &pp->offset); | 214 | ret = sscanf(argv[1], "%a[^+]+%d", (float *)(void *)&pp->function, &pp->offset); |
215 | if (ret == 1) | 215 | if (ret == 1) |
216 | pp->offset = 0; | 216 | pp->offset = 0; |
217 | 217 | ||