perf tools: remove sscanf extension %as
authorIrina Tirdea <irina.tirdea@intel.com>
Thu, 20 Sep 2012 20:37:50 +0000 (23:37 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 24 Sep 2012 14:49:31 +0000 (11:49 -0300)
commitbcbd004020bf0d725722be75da35fd326ff63ef4
tree82510369c7a6583b40a7d81d2ff4bbab6f835804
parent37e9d750e672d6fa8c25463bd76240410bbbc786
perf tools: remove sscanf extension %as

perf uses sscanf extension %as to read and allocate a string in the same
step.  This is a non-standard extension only present in new versions of
glibc.

Replacing the use of sscanf and %as with strtok_r calls in order to
parse a given string into its components.  This is needed in Android
since bionic does not support
%as extension for sscanf.

Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1348173470-4936-1-git-send-email-irina.tirdea@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/probe-event.c
tools/perf/util/trace-event-parse.c