From: David Goulet Date: Mon, 6 May 2013 15:31:49 +0000 (-0400) Subject: Fix: print lttng strerror on enable event with filter X-Git-Tag: v2.2.0-rc2~7 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8571134087a7a1fbd83924ab5b98836ce6ca840a;p=lttng-tools.git Fix: print lttng strerror on enable event with filter Fixes #516 Signed-off-by: David Goulet --- diff --git a/src/bin/lttng/commands/enable_events.c b/src/bin/lttng/commands/enable_events.c index 57837eb7d..2af85fe47 100644 --- a/src/bin/lttng/commands/enable_events.c +++ b/src/bin/lttng/commands/enable_events.c @@ -438,7 +438,6 @@ static int enable_events(char *session_name) ret = lttng_enable_event_with_filter(handle, &ev, channel_name, opt_filter); if (ret < 0) { - fprintf(stderr, "Ret filter: %d\n", ret); switch (-ret) { case LTTNG_ERR_FILTER_EXIST: WARN("Filter on events is already enabled" @@ -447,9 +446,8 @@ static int enable_events(char *session_name) break; case LTTNG_ERR_FILTER_INVAL: case LTTNG_ERR_FILTER_NOMEM: - ERR("%s", lttng_strerror(ret)); default: - ERR("Setting filter: '%s'", opt_filter); + ERR("%s", lttng_strerror(ret)); break; } goto error;