Rename get_event_type to config_get_event_type
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 22 Jun 2016 22:31:10 +0000 (18:31 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 11 Jul 2016 15:20:32 +0000 (11:20 -0400)
src/common/config/session-config.c
src/common/config/session-config.h

index 7322bc8b2c5398b75f5a199e2a17a27f5c7e826f..64eb6ea7032bd8675b7f91f450ad23b049d4d5ad 100644 (file)
@@ -978,8 +978,8 @@ error:
        return -1;
 }
 
-static
-int get_event_type(xmlChar *event_type)
+LTTNG_HIDDEN
+int config_get_event_type(const char *event_type)
 {
        int ret;
 
@@ -987,20 +987,20 @@ int get_event_type(xmlChar *event_type)
                goto error;
        }
 
-       if (!strcmp((char *) event_type, config_event_type_all)) {
+       if (!strcmp(event_type, config_event_type_all)) {
                ret = LTTNG_EVENT_ALL;
-       } else if (!strcmp((char *) event_type, config_event_type_tracepoint)) {
+       } else if (!strcmp(event_type, config_event_type_tracepoint)) {
                ret = LTTNG_EVENT_TRACEPOINT;
-       } else if (!strcmp((char *) event_type, config_event_type_probe)) {
+       } else if (!strcmp(event_type, config_event_type_probe)) {
                ret = LTTNG_EVENT_PROBE;
-       } else if (!strcmp((char *) event_type, config_event_type_function)) {
+       } else if (!strcmp(event_type, config_event_type_function)) {
                ret = LTTNG_EVENT_FUNCTION;
-       } else if (!strcmp((char *) event_type,
+       } else if (!strcmp(event_type,
                config_event_type_function_entry)) {
                ret = LTTNG_EVENT_FUNCTION_ENTRY;
-       } else if (!strcmp((char *) event_type, config_event_type_noop)) {
+       } else if (!strcmp(event_type, config_event_type_noop)) {
                ret = LTTNG_EVENT_NOOP;
-       } else if (!strcmp((char *) event_type, config_event_type_syscall)) {
+       } else if (!strcmp(event_type, config_event_type_syscall)) {
                ret = LTTNG_EVENT_SYSCALL;
        } else {
                goto error;
@@ -1645,7 +1645,7 @@ int process_event_node(xmlNodePtr event_node, struct lttng_handle *handle,
                                goto end;
                        }
 
-                       ret = get_event_type(content);
+                       ret = config_get_event_type((char *) content);
                        free(content);
                        if (ret < 0) {
                                ret = -LTTNG_ERR_LOAD_INVALID_CONFIG;
index 8e6e2803fc50658450c13c15b5d81f355f8ac610..7d53240115759312acca0d419bf5a3137d168b8f 100644 (file)
@@ -22,6 +22,7 @@
 #include <common/config/config-session-abi.h>
 #include <common/macros.h>
 #include <lttng/domain.h>
+#include <lttng/event.h>
 #include <stdint.h>
 
 struct config_entry {
@@ -45,6 +46,13 @@ struct config_element;
 LTTNG_HIDDEN
 const char *config_get_domain_str(enum lttng_domain_type domain);
 
+/*
+ * Return the event_type int value of lttng_event_type enumeration based on the
+ * passed string.
+ */
+LTTNG_HIDDEN
+int config_get_event_type(const char *event_type);
+
 /*
  * A config_entry_handler_cb receives config_entry structures belonging to the
  * sections the handler has been registered to.
This page took 0.031057 seconds and 5 git commands to generate.