perf probe: Check the result of e_snprintf()

Fix show_perf_probe_event() to check the result of e_snprintf().

Signed-off-by: Masami Hiramatsu <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Jim Keniston <[email protected]>
Cc: Ananth N Mavinakayanahalli <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Frank Ch. Eigler <[email protected]>
Cc: Jason Baron <[email protected]>
Cc: K.Prasad <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Srikar Dronamraju <[email protected]>
Cc: systemtap <[email protected]>
Cc: DLE <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
Masami Hiramatsu 2009-12-15 10:31:21 -05:00 • committed by Ingo Molnar
commit 7e990a5126

View file

@ -385,10 +385,12 @@ static void clear_probe_point(struct probe_point *pp)
static void show_perf_probe_event(const char *group, const char *event,
const char *place, struct probe_point *pp)
{
int i;
int i, ret;
char buf[128];
e_snprintf(buf, 128, "%s:%s", group, event);
ret = e_snprintf(buf, 128, "%s:%s", group, event);
if (ret < 0)
die("Failed to copy event: %s", strerror(-ret));
printf(" %-40s (on %s", buf, place);
if (pp->nr_args > 0) {