Rename filter string to filter expression in liblttng-ctl
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 8 Mar 2016 15:59:09 +0000 (10:59 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 8 Mar 2016 15:59:09 +0000 (10:59 -0500)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/lttng/event.h
src/bin/lttng/commands/list.c
src/common/mi-lttng.c
src/lib/lttng-ctl/lttng-ctl.c

index a97f8ffaaf915f2077aadb4a0724019699a98c0c..b2e4b7d89751be6aa948dabab37bd6a336ae415d 100644 (file)
@@ -296,15 +296,16 @@ extern int lttng_list_events(struct lttng_handle *handle,
                const char *channel_name, struct lttng_event **events);
 
 /*
- * Get the filter string of a specific LTTng event.
+ * Get the filter expression of a specific LTTng event.
  *
- * If the call is successful, then the filter string's address is put
- * in *filter_string. If the event has no filter string, *filter_string
- * is set to NULL. The caller does NOT own *filter_string.
+ * If the call is successful, then the filter expression's address is put
+ * in *filter_expression. If the event has no filter expression,
+ * *filter_expression is set to NULL. The caller does NOT own
+ * *filter_expression.
  *
  * Returns 0 on success, or a negative LTTng error code on error.
  */
-extern int lttng_event_get_filter_string(struct lttng_event *event,
+extern int lttng_event_get_filter_expression(struct lttng_event *event,
                const char **filter_string);
 
 /*
index 8e69e09efdc6bb85be8206a05d2d703a606f7ab0..1cce29b71d9d0919c7dd9b0342c65f0622f9a528 100644 (file)
@@ -278,7 +278,7 @@ static void print_events(struct lttng_event *event)
        char *filter_msg = NULL;
        char *exclusion_msg = NULL;
 
-       ret = lttng_event_get_filter_string(event, &filter_str);
+       ret = lttng_event_get_filter_expression(event, &filter_str);
 
        if (ret) {
                filter_msg = strdup(" [failed to retrieve filter]");
@@ -1072,7 +1072,8 @@ static int list_session_agent_events(void)
                        char *filter_msg = NULL;
                        struct lttng_event *event = &events[i];
 
-                       ret = lttng_event_get_filter_string(event, &filter_str);
+                       ret = lttng_event_get_filter_expression(event,
+                                       &filter_str);
                        if (ret) {
                                filter_msg = strdup(" [failed to retrieve filter]");
                        } else if (filter_str) {
index 5530acee9a1ce11e91aa2cef3e863ca385901a98..8401c26716aeaefd8e4ea8a6342582952e00d59a 100644 (file)
@@ -1022,7 +1022,7 @@ int mi_lttng_event_common_attributes(struct mi_writer *writer,
        }
 
        /* Event filter expression */
-       ret = lttng_event_get_filter_string(event, &filter_expression);
+       ret = lttng_event_get_filter_expression(event, &filter_expression);
        if (ret) {
                goto end;
        }
index 157d9a4335af5b5d52b3fcc7be942b4f2d77719a..fe0527d425b0e32e86b75d6b415a0e2aebf5e65b 100644 (file)
@@ -1809,13 +1809,13 @@ error:
        return ret;
 }
 
-int lttng_event_get_filter_string(struct lttng_event *event,
-       const char **filter_string)
+int lttng_event_get_filter_expression(struct lttng_event *event,
+       const char **filter_expression)
 {
        int ret = 0;
        struct lttcomm_event_extended_header *ext_header;
 
-       if (!event || !filter_string) {
+       if (!event || !filter_expression) {
                ret = -LTTNG_ERR_INVALID;
                goto end;
        }
@@ -1827,15 +1827,15 @@ int lttng_event_get_filter_string(struct lttng_event *event,
                 * This can happen since the lttng_event structure is
                 * used for other tasks where this pointer is never set.
                 */
-               *filter_string = NULL;
+               *filter_expression = NULL;
                goto end;
        }
 
        if (ext_header->filter_len) {
-               *filter_string = ((const char *) (ext_header)) +
-                       sizeof(*ext_header);
+               *filter_expression = ((const char *) (ext_header)) +
+                               sizeof(*ext_header);
        } else {
-               *filter_string = NULL;
+               *filter_expression = NULL;
        }
 
 end:
This page took 0.040734 seconds and 4 git commands to generate.