Fix: print lttng strerror on enable event with filter
authorDavid Goulet <dgoulet@efficios.com>
Mon, 6 May 2013 15:31:49 +0000 (11:31 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 6 May 2013 15:32:24 +0000 (11:32 -0400)
Fixes #516

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng/commands/enable_events.c

index 57837eb7dcadd3828110b7a7f386460ad491a570..2af85fe476eb74abaf71ea7b456a6ee1723408b1 100644 (file)
@@ -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;
This page took 0.027808 seconds and 4 git commands to generate.